(* ::Package:: *)

(* ::Title:: *)
(*Integration problems of the form *)
(*Cos[c+d x]^m (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Section:: *)
(*Cos[c+d x]^m (a+b Cos[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (a+b Cos[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^4*(a + b*Cos[c + d*x])^2, x, 6, (1/16)*(6*a^2 + 5*b^2)*x + (16*a*b*Sin[c + d*x])/(15*d) + ((6*a^2 + 5*b^2)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (8*a*b*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + ((6*a^2 + 5*b^2)*Cos[c + d*x]^3*Sin[c + d*x])/(24*d) + (2*a*b*Cos[c + d*x]^4*Sin[c + d*x])/(5*d) + (b^2*Cos[c + d*x]^5*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^3*(a + b*Cos[c + d*x])^2, x, 5, (3*a*b*x)/4 + (2*(5*a^2 + 4*b^2)*Sin[c + d*x])/(15*d) + (3*a*b*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((5*a^2 + 4*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*b*Cos[c + d*x]^3*Sin[c + d*x])/(2*d) + (b^2*Cos[c + d*x]^4*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(4*a^2 + 3*b^2)*x + (4*a*b*Sin[c + d*x])/(3*d) + ((4*a^2 + 3*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (2*a*b*Cos[c + d*x]^2*Sin[c + d*x])/(3*d) + (b^2*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^2, x, 3, a*b*x + ((3*a^2 + 2*b^2)*Sin[c + d*x])/(3*d) + (a*b*Cos[c + d*x]*Sin[c + d*x])/d + (b^2*Cos[c + d*x]^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^2, x, 2, (1/2)*(2*a^2 + b^2)*x + (2*a*b*Sin[c + d*x])/d + (b^2*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^2, x, 3, 2*a*b*x + (a^2*ArcTanh[Sin[c + d*x]])/d + (b^2*Sin[c + d*x])/d}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^2, x, 3, b^2*x + (2*a*b*ArcTanh[Sin[c + d*x]])/d + (a^2*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^2, x, 4, ((a^2 + 2*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (2*a*b*Tan[c + d*x])/d + (a^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^2, x, 5, (a*b*ArcTanh[Sin[c + d*x]])/d + ((2*a^2 + 3*b^2)*Tan[c + d*x])/(3*d) + (a*b*Sec[c + d*x]*Tan[c + d*x])/d + (a^2*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^2, x, 6, ((3*a^2 + 4*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (4*a*b*Tan[c + d*x])/(3*d) + ((3*a^2 + 4*b^2)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (2*a*b*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (a^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^2, x, 7, (3*a*b*ArcTanh[Sin[c + d*x]])/(4*d) + (2*(4*a^2 + 5*b^2)*Tan[c + d*x])/(15*d) + (3*a*b*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((4*a^2 + 5*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (a*b*Sec[c + d*x]^3*Tan[c + d*x])/(2*d) + (a^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^3*(a + b*Cos[c + d*x])^3, x, 6, (1/16)*b*(18*a^2 + 5*b^2)*x + (2*a*(5*a^2 + 12*b^2)*Sin[c + d*x])/(15*d) + (b*(18*a^2 + 5*b^2)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (a*(5*a^2 + 12*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (b*(18*a^2 + 5*b^2)*Cos[c + d*x]^3*Sin[c + d*x])/(24*d) + (13*a*b^2*Cos[c + d*x]^4*Sin[c + d*x])/(30*d) + (b^2*Cos[c + d*x]^4*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*a*(4*a^2 + 9*b^2)*x - ((3*a^4 - 52*a^2*b^2 - 16*b^4)*Sin[c + d*x])/(30*b*d) - (a*(6*a^2 - 71*b^2)*Cos[c + d*x]*Sin[c + d*x])/(120*d) - ((3*a^2 - 16*b^2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*b*d) - (a*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*b*d) + ((a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^3, x, 4, (3/8)*b*(4*a^2 + b^2)*x + (a*(a^2 + 4*b^2)*Sin[c + d*x])/(2*d) + (b*(2*a^2 + 3*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(4*d) + ((a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^3, x, 3, (1/2)*a*(2*a^2 + 3*b^2)*x + (2*b*(4*a^2 + b^2)*Sin[c + d*x])/(3*d) + (5*a*b^2*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^3, x, 4, (1/2)*b*(6*a^2 + b^2)*x + (a^3*ArcTanh[Sin[c + d*x]])/d + (5*a*b^2*Sin[c + d*x])/(2*d) + (b^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^3, x, 4, 3*a*b^2*x + (3*a^2*b*ArcTanh[Sin[c + d*x]])/d - (b*(a^2 - b^2)*Sin[c + d*x])/d + (a^2*(a + b*Cos[c + d*x])*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^3, x, 4, b^3*x + (a*(a^2 + 6*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (5*a^2*b*Tan[c + d*x])/(2*d) + (a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^3, x, 5, (b*(3*a^2 + 2*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(2*a^2 + 9*b^2)*Tan[c + d*x])/(3*d) + (7*a^2*b*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^3, x, 6, (3*a*(a^2 + 4*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (b*(2*a^2 + b^2)*Tan[c + d*x])/d + (3*a*(a^2 + 4*b^2)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (3*a^2*b*Sec[c + d*x]^2*Tan[c + d*x])/(4*d) + (a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^3, x, 7, (b*(9*a^2 + 4*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*a*(4*a^2 + 15*b^2)*Tan[c + d*x])/(15*d) + (b*(9*a^2 + 4*b^2)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(4*a^2 + 15*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (11*a^2*b*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^3*(a + b*Cos[c + d*x])^4, x, 7, (1/4)*a*b*(6*a^2 + 5*b^2)*x + (2*(35*a^4 + 168*a^2*b^2 + 24*b^4)*Sin[c + d*x])/(105*d) + (a*b*(6*a^2 + 5*b^2)*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((35*a^4 + 168*a^2*b^2 + 24*b^4)*Cos[c + d*x]^2*Sin[c + d*x])/(105*d) + (a*b*(6*a^2 + 5*b^2)*Cos[c + d*x]^3*Sin[c + d*x])/(6*d) + (b^2*(71*a^2 + 18*b^2)*Cos[c + d*x]^4*Sin[c + d*x])/(105*d) + (8*a*b^2*Cos[c + d*x]^4*(a + b*Cos[c + d*x])*Sin[c + d*x])/(21*d) + (b^2*Cos[c + d*x]^4*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^4, x, 6, (1/16)*(8*a^4 + 36*a^2*b^2 + 5*b^4)*x - (a*(4*a^4 - 121*a^2*b^2 - 128*b^4)*Sin[c + d*x])/(60*b*d) - ((8*a^4 - 178*a^2*b^2 - 75*b^4)*Cos[c + d*x]*Sin[c + d*x])/(240*d) - (a*(4*a^2 - 53*b^2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(120*b*d) - ((4*a^2 - 25*b^2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(120*b*d) - (a*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(30*b*d) + ((a + b*Cos[c + d*x])^5*Sin[c + d*x])/(6*b*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^4, x, 5, (1/2)*a*b*(4*a^2 + 3*b^2)*x + (2*(3*a^4 + 28*a^2*b^2 + 4*b^4)*Sin[c + d*x])/(15*d) + (a*b*(6*a^2 + 29*b^2)*Cos[c + d*x]*Sin[c + d*x])/(30*d) + ((3*a^2 + 4*b^2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(15*d) + (a*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(5*d) + ((a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^4, x, 4, (1/8)*(8*a^4 + 24*a^2*b^2 + 3*b^4)*x + (a*b*(19*a^2 + 16*b^2)*Sin[c + d*x])/(6*d) + (b^2*(26*a^2 + 9*b^2)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (7*a*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^4, x, 5, 2*a*b*(2*a^2 + b^2)*x + (a^4*ArcTanh[Sin[c + d*x]])/d + (b^2*(13*a^2 + 2*b^2)*Sin[c + d*x])/(3*d) + (4*a*b^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d) + (b^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^4, x, 5, (1/2)*b^2*(12*a^2 + b^2)*x + (4*a^3*b*ArcTanh[Sin[c + d*x]])/d - (a*b*(2*a^2 - 7*b^2)*Sin[c + d*x])/(2*d) - (b*(2*a^2 - b^2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (a^2*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^4, x, 5, 4*a*b^3*x + (a^2*(a^2 + 12*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) - (b^2*(7*a^2 - 2*b^2)*Sin[c + d*x])/(2*d) + (3*a^2*b*(a + b*Cos[c + d*x])*Tan[c + d*x])/d + (a^2*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^4, x, 5, b^4*x + (2*a*b*(a^2 + 2*b^2)*ArcTanh[Sin[c + d*x]])/d + (a^2*(2*a^2 + 13*b^2)*Tan[c + d*x])/(3*d) + (4*a^2*b*(b + a*Sec[c + d*x])*Tan[c + d*x])/(3*d) + (a^2*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^4, x, 6, ((3*a^4 + 24*a^2*b^2 + 8*b^4)*ArcTanh[Sin[c + d*x]])/(8*d) + (4*a*b*(2*a^2 + 3*b^2)*Tan[c + d*x])/(3*d) + (a^2*(9*a^2 + 46*b^2)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (5*a^2*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(6*d) + (a^2*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^4, x, 7, (a*b*(3*a^2 + 4*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + ((8*a^4 + 60*a^2*b^2 + 15*b^4)*Tan[c + d*x])/(15*d) + (a*b*(3*a^2 + 4*b^2)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (2*a^2*(2*a^2 + 9*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (3*a^2*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(5*d) + (a^2*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(a + b*Cos[c + d*x])^4, x, 8, ((5*a^4 + 36*a^2*b^2 + 8*b^4)*ArcTanh[Sin[c + d*x]])/(16*d) + (8*a*b*(4*a^2 + 5*b^2)*Tan[c + d*x])/(15*d) + ((5*a^4 + 36*a^2*b^2 + 8*b^4)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (4*a*b*(4*a^2 + 5*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (a^2*(25*a^2 + 104*b^2)*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + (7*a^2*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^4*Tan[c + d*x])/(15*d) + (a^2*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^5/(a + b*Cos[c + d*x]), x, 6, ((8*a^4 + 4*a^2*b^2 + 3*b^4)*x)/(8*b^5) - (2*a^5*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*Sqrt[a^2 - b^2]*d) - (a*(3*a^2 + 2*b^2)*Sin[c + d*x])/(3*b^4*d) + ((4*a^2 + 3*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*b^3*d) - (a*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*d) + (Cos[c + d*x]^3*Sin[c + d*x])/(4*b*d)}
{Cos[c + d*x]^4/(a + b*Cos[c + d*x]), x, 5, -((a*(2*a^2 + b^2)*x)/(2*b^4)) + (2*a^4*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*a^2 + 2*b^2)*Sin[c + d*x])/(3*b^3*d) - (a*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) + (Cos[c + d*x]^2*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x]), x, 4, ((2*a^2 + b^2)*x)/(2*b^3) - (2*a^3*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) - (a*Sin[c + d*x])/(b^2*d) + (Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x]), x, 4, -((a*x)/b^2) + (2*a^2*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + Sin[c + d*x]/(b*d)}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x]), x, 2, x/b - (2*a*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x]), x, 1, (2*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x]), x, 3, -((2*b*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)) + ArcTanh[Sin[c + d*x]]/(a*d)}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x]), x, 5, (2*b^2*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - (b*ArcTanh[Sin[c + d*x]])/(a^2*d) + Tan[c + d*x]/(a*d)}
{Sec[c + d*x]^3/(a + b*Cos[c + d*x]), x, 5, -((2*b^3*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d)) + ((a^2 + 2*b^2)*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - (b*Tan[c + d*x])/(a^2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4/(a + b*Cos[c + d*x]), x, 6, (2*b^4*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) - (b*(a^2 + 2*b^2)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) + ((2*a^2 + 3*b^2)*Tan[c + d*x])/(3*a^3*d) - (b*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) + (Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}


{Cos[c + d*x]^5/(a + b*Cos[c + d*x])^2, x, 6, -((a*(4*a^2 + b^2)*x)/b^5) + (2*a^4*(4*a^2 - 5*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(3/2)*d) + ((12*a^4 - 7*a^2*b^2 - 2*b^4)*Sin[c + d*x])/(3*b^4*(a^2 - b^2)*d) - (a*(2*a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((4*a^2 - b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - (a^2*Cos[c + d*x]^3*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^4/(a + b*Cos[c + d*x])^2, x, 5, ((6*a^2 + b^2)*x)/(2*b^4) - (2*a^3*(3*a^2 - 4*b^2)*ArcTanh[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[-a^2 + b^2]])/(b^4*(-a^2 + b^2)^(3/2)*d) - (2*a*Sin[c + d*x])/(b^3*d) + (Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) - (a^4*Sin[c + d*x])/(b^3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])), ((6*a^2 + b^2)*x)/(2*b^4) - (2*a^3*(3*a^2 - 4*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - (a*(3*a^2 - 2*b^2)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((3*a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) - (a^2*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x])^2, x, 4, -((2*a*x)/b^3) + (2*a^2*(2*a^2 - 3*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((2*a^2 - b^2)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) - (a^2*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x])^2, x, 3, x/b^2 - (2*a*(a^2 - 2*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - (a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x])^2, x, 3, -((2*b*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d)) + (a*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x])^2, x, 3, (2*a*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) - (b*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x])^2, x, 4, -((2*b*(2*a^2 - b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d)) + ArcTanh[Sin[c + d*x]]/(a^2*d) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x])^2, x, 5, (2*b^2*(3*a^2 - 2*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) - (2*b*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2 - 2*b^2)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + (b^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3/(a + b*Cos[c + d*x])^2, x, 6, -((2*b^3*(4*a^2 - 3*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d)) + ((a^2 + 6*b^2)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) - (b*(2*a^2 - 3*b^2)*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2 - 3*b^2)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d) + (b^2*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^4/(a + b*Cos[c + d*x])^2, x, 7, (2*b^4*(5*a^2 - 4*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) - (b*(a^2 + 4*b^2)*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((2*a^4 + 7*a^2*b^2 - 12*b^4)*Tan[c + d*x])/(3*a^4*(a^2 - b^2)*d) - (b*(a^2 - 2*b^2)*Sec[c + d*x]*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2 - 4*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b^2*Sec[c + d*x]^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^5/(a + b*Cos[c + d*x])^3, x, 6, ((12*a^2 + b^2)*x)/(2*b^5) - (a^3*(12*a^4 - 29*a^2*b^2 + 20*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) - (3*a*(4*a^4 - 7*a^2*b^2 + 2*b^4)*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) + ((6*a^4 - 10*a^2*b^2 + b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - (a^2*Cos[c + d*x]^3*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a^2*(4*a^2 - 7*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^4/(a + b*Cos[c + d*x])^3, x, 5, -((3*a*x)/b^4) + (3*a^2*(2*a^4 - 5*a^2*b^2 + 4*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) + ((6*a^4 - 11*a^2*b^2 + 2*b^4)*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - (a^2*Cos[c + d*x]^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (3*a^2*(a^2 - 2*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x])^3, x, 4, x/b^3 - (a*(2*a^4 - 5*a^2*b^2 + 6*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - (a^2*Cos[c + d*x]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a^2*(2*a^2 - 5*b^2)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x])^3, x, 4, ((a^2 + 2*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - (a^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(a^2 - 4*b^2)*Sin[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x])^3, x, 4, -((3*a*b*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) + (a*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2 + 2*b^2)*Sin[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x])^3, x, 4, ((2*a^2 + b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - (b*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (3*a*b*Sin[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x])^3, x, 5, -((b*(6*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d)) + ArcTanh[Sin[c + d*x]]/(a^3*d) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b^2*(5*a^2 - 2*b^2)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x])^3, x, 6, (3*b^2*(4*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) - (3*b*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4 - 11*a^2*b^2 + 6*b^4)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (3*b^2*(2*a^2 - b^2)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3/(a + b*Cos[c + d*x])^3, x, 7, -((b^3*(20*a^4 - 29*a^2*b^2 + 12*b^4)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d)) + ((a^2 + 12*b^2)*ArcTanh[Sin[c + d*x]])/(2*a^5*d) - (3*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4 - 10*a^2*b^2 + 6*b^4)*Sec[c + d*x]*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b^2*(7*a^2 - 4*b^2)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^5/(a + b*Cos[c + d*x])^4, x, 6, -((4*a*x)/b^5) + (a^2*(8*a^6 - 28*a^4*b^2 + 35*a^2*b^4 - 20*b^6)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((24*a^6 - 68*a^4*b^2 + 65*a^2*b^4 - 6*b^6)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - (a^2*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a^2*(4*a^2 - 9*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - (a^2*(4*a^4 - 11*a^2*b^2 + 12*b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^4/(a + b*Cos[c + d*x])^4, x, 5, x/b^4 - (a*(2*a^6 - 7*a^4*b^2 + 8*a^2*b^4 - 8*b^6)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - (a^2*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a^2*(3*a^2 - 8*b^2)*Cos[c + d*x]*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - (a^2*(6*a^4 - 17*a^2*b^2 + 26*b^4)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x])^4, x, 5, -((b*(3*a^2 + 2*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - (a^2*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a^2*(2*a^2 - 7*b^2)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(2*a^4 - 5*a^2*b^2 + 18*b^4)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x])^4, x, 5, (a*(a^2 + 4*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - (a^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (a*(a^2 - 6*b^2)*Sin[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((a^4 - 10*a^2*b^2 - 6*b^4)*Sin[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x])^4, x, 5, -((b*(4*a^2 + b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) + (a*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((2*a^2 + 3*b^2)*Sin[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(2*a^2 + 13*b^2)*Sin[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x])^4, x, 5, (a*(2*a^2 + 3*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - (b*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (5*a*b*Sin[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - (b*(11*a^2 + 4*b^2)*Sin[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x])^4, x, 6, -((b*(8*a^6 - 8*a^4*b^2 + 7*a^2*b^4 - 2*b^6)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d)) + ArcTanh[Sin[c + d*x]]/(a^4*d) + (b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (b^2*(8*a^2 - 3*b^2)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (b^2*(26*a^4 - 17*a^2*b^2 + 6*b^4)*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x])^4, x, 7, (b^2*(20*a^6 - 35*a^4*b^2 + 28*a^2*b^4 - 8*b^6)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) - (4*b*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((6*a^6 - 65*a^4*b^2 + 68*a^2*b^4 - 24*b^6)*Tan[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + (b^2*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (b^2*(9*a^2 - 4*b^2)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (b^2*(12*a^4 - 11*a^2*b^2 + 4*b^4)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}


{1/(3 + 5*Cos[c + d*x]), x, 1, ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]]/(2*d)}
{1/(3 + 5*Cos[c + d*x])^2, x, 3, -((3*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(32*d)) + (5*Sin[c + d*x])/(16*d*(3 + 5*Cos[c + d*x]))}
{1/(3 + 5*Cos[c + d*x])^3, x, 4, (43*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(1024*d) + (5*Sin[c + d*x])/(32*d*(3 + 5*Cos[c + d*x])^2) - (45*Sin[c + d*x])/(512*d*(3 + 5*Cos[c + d*x]))}
{1/(3 + 5*Cos[c + d*x])^4, x, 5, -((279*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(16384*d)) + (5*Sin[c + d*x])/(48*d*(3 + 5*Cos[c + d*x])^3) - (25*Sin[c + d*x])/(512*d*(3 + 5*Cos[c + d*x])^2) + (995*Sin[c + d*x])/(24576*d*(3 + 5*Cos[c + d*x]))}

{1/(5 + 3*Cos[c + d*x]), x, 1, x/4 - ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])]/(2*d)}
{1/(5 + 3*Cos[c + d*x])^2, x, 3, (5*x)/64 - (5*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(32*d) - (3*Sin[c + d*x])/(16*d*(5 + 3*Cos[c + d*x]))}
{1/(5 + 3*Cos[c + d*x])^3, x, 4, (59*x)/2048 - (59*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(1024*d) - (3*Sin[c + d*x])/(32*d*(5 + 3*Cos[c + d*x])^2) - (45*Sin[c + d*x])/(512*d*(5 + 3*Cos[c + d*x]))}
{1/(5 + 3*Cos[c + d*x])^4, x, 5, (385*x)/32768 - (385*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(16384*d) - Sin[c + d*x]/(16*d*(5 + 3*Cos[c + d*x])^3) - (25*Sin[c + d*x])/(512*d*(5 + 3*Cos[c + d*x])^2) - (311*Sin[c + d*x])/(8192*d*(5 + 3*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]], x, 8, (2*a*(a + b)*(8*a^2 + 19*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(8*a^4 + 17*a^2*b^2 - 25*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*a^2 - 25*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^2*d) + (2*a*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b*d) + (2*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]], x, 7, -((2*(a + b)*(2*a^2 - 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (4*a*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b*d) + (2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^1*Sqrt[a + b*Cos[c + d*x]], x, 6, (2*a*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^0*Sqrt[a + b*Cos[c + d*x]], x, 2, (2*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*Sqrt[a + b*Cos[c + d*x]], x, 5, (2*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]], x, 9, -(((a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + (a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]], x, 10, -((b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]])) + (3*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a*d) + (Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}


{Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2), x, 9, (2*(a + b)*(8*a^4 + 33*a^2*b^2 + 147*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(8*a^4 + 31*a^2*b^2 - 39*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (8*a*(a^2 - 22*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(3*a^2 + 49*b^2)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (20*a*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*d) + (2*b*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2), x, 8, -((4*a*(a + b)*(3*a^2 - 41*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(6*a^4 - 31*a^2*b^2 + 25*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(6*a^2 - 25*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b*d) - (4*a*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*b*d) + (2*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(a + b)*(a^2 + 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^(3/2), x, 6, (8*a*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2), x, 9, -((a*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a^2 + 2*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (3*a*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2), x, 10, -((5*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + (7*a*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2 + 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (5*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}


{Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(5/2), x, 10, (2*a*(a + b)*(8*a^4 + 51*a^2*b^2 + 741*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(693*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(8*a^6 + 49*a^4*b^2 + 78*a^2*b^4 - 135*b^6)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(693*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*a^4 - 205*a^2*b^2 - 135*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*b^2*d) + (2*a*(3*a^2 + 229*b^2)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*b*d) + (2*(113*a^2 + 81*b^2)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*d) + (46*a*b*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(99*d) + (2*b^2*Cos[c + d*x]^4*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2), x, 9, -((2*(a + b)*(10*a^4 - 279*a^2*b^2 - 147*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (4*a*(5*a^4 - 62*a^2*b^2 + 57*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(5*a^2 - 57*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) - (2*(10*a^2 - 49*b^2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(315*b*d) - (4*a*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(63*b*d) + (2*(a + b*Cos[c + d*x])^(7/2)*Sin[c + d*x])/(9*b*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^(5/2), x, 8, (2*a*(a + b)*(3*a^2 + 29*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(21*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a^4 + 2*a^2*b^2 - 5*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(21*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2 + 5*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d) + (2*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(a + b)*(23*a^2 + 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) - (16*a*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (16*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^(5/2), x, 9, (14*a*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*a^2 + b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^3*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2), x, 9, -(((a + b)*(a^2 - 2*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + (a*(a^2 + 4*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (5*a^2*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a^2*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^(5/2), x, 10, -((9*a*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + (b*(11*a^2 + 8*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(4*a^2 + 15*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (9*a*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^(5/2), x, 11, -(((a + b)*(16*a^2 + 33*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + (a*(16*a^2 + 59*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + (5*b*(4*a^2 + b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2 + 33*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*d) + (13*a*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*d) + (a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{(a + b*Cos[c + d*x])^(7/2), x, 8, (32*a*(a + b)*(11*a^2 + 13*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(71*a^4 - 46*a^2*b^2 - 25*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(71*a^2 + 25*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (24*a*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*b*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3/Sqrt[a + b*Cos[c + d*x]], x, 7, (2*(a + b)*(8*a^2 + 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(8*a^2 + 7*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (8*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^2*d) + (2*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^2/Sqrt[a + b*Cos[c + d*x]], x, 6, -((4*a*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2 + b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^1/Sqrt[a + b*Cos[c + d*x]], x, 5, (2*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0/Sqrt[a + b*Cos[c + d*x]], x, 2, (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1/Sqrt[a + b*Cos[c + d*x]], x, 2, (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2/Sqrt[a + b*Cos[c + d*x]], x, 9, -(((a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3/Sqrt[a + b*Cos[c + d*x]], x, 10, (3*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2 + 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (3*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^2*d) + (Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}


{Cos[c + d*x]^4/(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(16*a^4 - 8*a^2*b^2 - 3*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*(a - b)*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (8*a*(4*a^2 + b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(8*a^2 - 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^3*(a^2 - b^2)*d) + (2*(6*a^2 - b^2)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*a*(8*a^2 - 5*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(8*a^2 + b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(4*a^2 - b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(2*a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x])^(3/2), x, 4, (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x])^(3/2), x, 10, -(((a^2 - 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - (3*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2 - 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^3/(a + b*Cos[c + d*x])^(3/2), x, 11, (b*(7*a^2 - 15*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (5*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2 + 15*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^3*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(7*a^2 - 15*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^3*(a^2 - b^2)*d) + (2*b^2*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2 - 5*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d)}


{Cos[c + d*x]^5/(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(128*a^6 - 212*a^4*b^2 + 55*a^2*b^4 + 9*b^6)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^2*b^5*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(128*a^4 - 116*a^2*b^2 - 17*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^5*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (8*a^2*(2*a^2 - 3*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(32*a^4 - 49*a^2*b^2 + 7*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^4*(a^2 - b^2)^2*d) + (2*(48*a^4 - 71*a^2*b^2 + 3*b^4)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^4/(a + b*Cos[c + d*x])^(5/2), x, 8, -((8*a*(4*a^4 - 7*a^2*b^2 + 2*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(16*a^4 - 16*a^2*b^2 - b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^4*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*a^2*(3*a^2 - 5*b^2)*Cos[c + d*x]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(8*a^4 - 13*a^2*b^2 + b^4)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^3/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(8*a^4 - 15*a^2*b^2 + 3*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(8*a^2 - 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (8*a^2*(a^2 - 2*b^2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^2/(a + b*Cos[c + d*x])^(5/2), x, 7, -((4*a*(a^2 - 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2 - 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*a*(a^2 - 3*b^2)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^1/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a^2 + 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(a^2 + 3*b^2)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0/(a + b*Cos[c + d*x])^(5/2), x, 7, (8*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (8*a*b*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1/(a + b*Cos[c + d*x])^(5/2), x, 10, -((2*b*(7*a^2 - 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b^2*(7*a^2 - 3*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2/(a + b*Cos[c + d*x])^(5/2), x, 11, -(((3*a^4 - 26*a^2*b^2 + 15*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*a^2 - 5*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (5*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b^2*(9*a^2 - 5*b^2)*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4 - 26*a^2*b^2 + 15*b^4)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}


{1/(a + b*Cos[c + d*x])^(7/2), x, 8, (2*(23*a^2 + 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^3*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (16*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sin[c + d*x])/(5*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(5/2)) - (16*a*b*Sin[c + d*x])/(15*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^(3/2)) - (2*b*(23*a^2 + 9*b^2)*Sin[c + d*x])/(15*(a^2 - b^2)^3*d*Sqrt[a + b*Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2, x, 7, (2*(9*a^2 + 7*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (20*a*b*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (20*a*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(9*a^2 + 7*b^2)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (4*a*b*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*b^2*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2, x, 6, (12*a*b*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(7*a^2 + 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (4*a*b*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*b^2*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^2, x, 5, (2*(5*a^2 + 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (4*a*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*b^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^2, x, 4, (4*a*b*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(3*a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^2, x, 4, -((2*(a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/d) + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/d + (2*a^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^2, x, 5, -((4*a*b*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a^2 + 3*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (4*a*b*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^2, x, 6, -((2*(3*a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (4*a*b*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2 + 5*b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3, x, 7, (2*b*(27*a^2 + 7*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*a*(7*a^2 + 15*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*a*(7*a^2 + 15*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*b*(27*a^2 + 7*b^2)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (40*a*b^2*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*b^2*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^3, x, 6, (2*a*(5*a^2 + 9*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*b*(21*a^2 + 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*b*(21*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (32*a*b^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*b^2*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^3, x, 5, (6*b*(5*a^2 + b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*a*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/d + (8*a*b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(5*d) + (2*b^2*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^3, x, 5, -((2*a*(a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*b*(9*a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^3, x, 5, -((2*b*(3*a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*a*(a^2 + 9*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (16*a^2*b*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^3, x, 6, -((6*a*(a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*b*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/d + (8*a^2*b*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2)) + (6*a*(a^2 + 5*b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{Cos[c + d*x]^(-9/2)*(a + b*Cos[c + d*x])^3, x, 7, -((2*b*(9*a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*a*(5*a^2 + 21*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (32*a^2*b*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*a*(5*a^2 + 21*b^2)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*b*(9*a^2 + 5*b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)/(a + b*Cos[c + d*x]), x, 6, -((2*a*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d)) + (2*(3*a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^3*d) - (2*a^3*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x]), x, 5, (2*EllipticE[(1/2)*(c + d*x), 2])/(b*d) - (2*a*EllipticF[(1/2)*(c + d*x), 2])/(b^2*d) + (2*a^2*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d)}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x]), x, 3, (2*EllipticF[(1/2)*(c + d*x), 2])/(b*d) - (2*a*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b*(a + b)*d)}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x]), x, 1, (2*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a + b)*d)}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x]), x, 5, -((2*EllipticE[(1/2)*(c + d*x), 2])/(a*d)) - (2*b*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d) + (2*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x]), x, 7, (2*b*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d) + (2*EllipticF[(1/2)*(c + d*x), 2])/(3*a*d) + (2*b^2*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d) + (2*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*b*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(7/2)/(a + b*Cos[c + d*x])^2, x, 7, -((a*(5*a^2 - 4*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d)) + ((15*a^4 - 16*a^2*b^2 - 2*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*(a^2 - b^2)*d) - (a^3*(5*a^2 - 7*b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^4*(a + b)^2*d) + ((5*a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - (a^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^2, x, 6, ((3*a^2 - 2*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) - (a*(3*a^2 - 4*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d) + (a^2*(3*a^2 - 5*b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^3*(a + b)^2*d) - (a^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^2, x, 6, -((a*EllipticE[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d)) + ((a^2 - 2*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) - (a*(a^2 - 3*b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^2*(a + b)^2*d) + (a*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^2, x, 6, EllipticE[(1/2)*(c + d*x), 2]/((a^2 - b^2)*d) + (a*EllipticF[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) - ((a^2 + b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b*(a + b)^2*d) - (b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^2, x, 6, -((b*EllipticE[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d)) - EllipticF[(1/2)*(c + d*x), 2]/((a^2 - b^2)*d) + ((3*a^2 - b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a - b)*(a + b)^2*d) + (b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^2, x, 7, -(((2*a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d)) + (b*EllipticF[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d) - (b*(5*a^2 - 3*b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a - b)*(a + b)^2*d) + ((2*a^2 - 3*b^2)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^2, x, 8, (b*(4*a^2 - 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d) + ((2*a^2 - 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^2*(a^2 - b^2)*d) + (b^2*(7*a^2 - 5*b^2)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a - b)*(a + b)^2*d) + ((2*a^2 - 5*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (b*(4*a^2 - 5*b^2)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^(9/2)/(a + b*Cos[c + d*x])^3, x, 8, -((a*(35*a^4 - 65*a^2*b^2 + 24*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d)) + ((105*a^6 - 223*a^4*b^2 + 128*a^2*b^4 + 8*b^6)*EllipticF[(1/2)*(c + d*x), 2])/(12*b^5*(a^2 - b^2)^2*d) - (a^3*(35*a^4 - 86*a^2*b^2 + 63*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^5*(a + b)^3*d) + ((35*a^4 - 61*a^2*b^2 + 8*b^4)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) - (a^2*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a^2*(7*a^2 - 13*b^2)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(7/2)/(a + b*Cos[c + d*x])^3, x, 7, ((15*a^4 - 29*a^2*b^2 + 8*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) - (3*a*(5*a^4 - 11*a^2*b^2 + 8*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d) + (a^2*(15*a^4 - 38*a^2*b^2 + 35*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^4*(a + b)^3*d) - (a^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a^2*(5*a^2 - 11*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^3, x, 7, -((3*a*(a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d)) + ((3*a^4 - 5*a^2*b^2 + 8*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) - (3*a*(a^4 - 2*a^2*b^2 + 5*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^3*(a + b)^3*d) - (a^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (3*a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^3, x, 7, -(((a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*b*(a^2 - b^2)^2*d)) + (a*(a^2 - 7*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) - ((a^4 - 10*a^2*b^2 - 3*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^2*(a + b)^3*d) + (a*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^3, x, 7, ((5*a^2 + b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*a*(a^2 - b^2)^2*d) + (3*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*b*(a^2 - b^2)^2*d) - ((3*a^4 + 10*a^2*b^2 - b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b*(a + b)^3*d) - (b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (b*(5*a^2 + b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^3, x, 7, -((3*b*(3*a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d)) - ((7*a^2 - b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*(a^2 - b^2)^2*d) + (3*(5*a^4 - 2*a^2*b^2 + b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^2*(a - b)^2*(a + b)^3*d) + (b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (3*b^2*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^3, x, 8, -(((8*a^4 - 29*a^2*b^2 + 15*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d)) + (b*(11*a^2 - 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d) - (b*(35*a^4 - 38*a^2*b^2 + 15*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^3*(a - b)^2*(a + b)^3*d) + ((8*a^4 - 29*a^2*b^2 + 15*b^4)*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2) + (b^2*(11*a^2 - 5*b^2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^3, x, 9, (b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^3*(a^2 - b^2)^2*d) + (b^2*(63*a^4 - 86*a^2*b^2 + 35*b^4)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2) + (b^2*(13*a^2 - 7*b^2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((a - 2*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - ((a^2 - 4*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (a*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d)}
{Cos[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(1/2), x, 6, ((a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(1/2), x, 3, (2*(a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(1/2), x, 4, -((2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^(1/2), x, 5, -((2*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*(a + b)*(9*a^2 - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2 + 7*a*b - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2 - 2*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2), x, 8, ((a + b)*(3*a^2 + 16*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(7*a - 26*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(a^2 - 12*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + (7*a*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d) + (b*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((3*a^2 + 16*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b*d)}
{Cos[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(3/2), x, 7, (5*a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a^2 - a*b + 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (5*a*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(3/2), x, 7, (b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(a - 2*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (6*a*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2 + 2*a*b - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^(3/2), x, 5, -((8*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2 + 4*a*b + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (8*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a + b)*(3*a^2 + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(5*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2 + 4*a*b + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(5*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (4*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2 + b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(a + b*Cos[c + d*x])^(3/2), x, 7, -((4*b*(a + b)*(41*a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3 + 82*a^2*b + 51*a*b^2 - 6*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (16*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2 + 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a*d*Cos[c + d*x]^(3/2)) + (4*b*(41*a^2 - 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2), x, 9, (a*(a + b)*(15*a^2 + 284*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((59*a^3 - 322*a^2*b + 36*a*b^2 - 72*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(96*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*a^4 - 120*a^2*b^2 - 48*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((59*a^2 + 36*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*d) + (17*a*b*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d) + (b^2*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (a*(15*a^2 + 284*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b*d)}
{Cos[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, ((a + b)*(33*a^2 + 16*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(24*a^2 - 13*a*b + 38*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (5*a*(a^2 + 4*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (13*a*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d) + (b^2*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((33*a^2 + 16*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(5/2), x, 7, (9*a*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^3 - 12*a^2*b + a*b^2 - 2*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(15*a^2 + 4*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b^2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (9*a*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(5/2), x, 7, -(((a + b)*(2*a^2 - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*a*(a^2 + 3*a*b - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (10*a*b^2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((2*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^(5/2), x, 7, -((14*a*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^3 + 7*a^2*b + 9*a*b^2 - 3*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (14*a*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^(5/2), x, 6, -((2*(a + b)*(9*a^2 + 23*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3 + 17*a^2*b + 23*a*b^2 + 15*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (22*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2 + 23*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*b*(a + b)*(29*a^2 + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(21*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(5*a^3 + 29*a^2*b + 27*a*b^2 + 3*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(21*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (6*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(5/2)) + (2*(5*a^2 + 9*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*b*(29*a^2 + 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(21*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-11/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*(a + b)*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4 + 261*a^3*b + 279*a^2*b^2 + 155*a*b^3 - 10*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (38*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2 + 75*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*b*(163*a^2 + 5*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(3/2)) + (2*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{1/(Sqrt[Cos[c + d*x]]*Sqrt[2 + 3*Cos[c + d*x]]), x, 1, (2*EllipticF[ArcSin[Tan[(c+d*x)/2]], 1/5])/(d*Sqrt[5])}
{1/(Sqrt[Cos[c + d*x]]*Sqrt[-2 + 3*Cos[c + d*x]]), x, 1, (2*EllipticF[ArcSin[Tan[(c+d*x)/2]], 5])/d}

{1/(Sqrt[Cos[c + d*x]]*Sqrt[2 - 3*Cos[c + d*x]]), x, 1, (2*Sqrt[(2 - 3*Cos[c + d*x])/(-1 - Cos[c + d*x])]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 5])/(d*Sqrt[2 - 3*Cos[c + d*x]])}
{1/(Sqrt[Cos[c + d*x]]*Sqrt[-2 - 3*Cos[c + d*x]]), x, 1, (2*Sqrt[-((-2 - 3*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 1/5])/(Sqrt[5]*d*Sqrt[-2 - 3*Cos[c + d*x]])}

{1/(Sqrt[Cos[c + d*x]]*Sqrt[3 + 2*Cos[c + d*x]]), x, 1, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(3 + 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[3 + 2*Cos[c + d*x]])}
{1/(Sqrt[Cos[c + d*x]]*Sqrt[3 - 2*Cos[c + d*x]]), x, 1, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[3 - 2*Cos[c + d*x]])}

{1/(Sqrt[Cos[c + d*x]]*Sqrt[-3 + 2*Cos[c + d*x]]), x, 1, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(-3 + 2*Cos[c + d*x])/(-1 - Cos[c + d*x])]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[-3 + 2*Cos[c + d*x]])}
{1/(Sqrt[Cos[c + d*x]]*Sqrt[-3 - 2*Cos[c + d*x]]), x, 1, (2*Sqrt[-((-3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[-3 - 2*Cos[c + d*x]])}


{Sqrt[Cos[c + d*x]]/Sqrt[2 + 3*Cos[c + d*x]], x, 3, -((2*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 1/5])/(Sqrt[5]*d)) + (4*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], 1/5])/(Sqrt[5]*d)}
{Sqrt[Cos[c + d*x]]/Sqrt[-2 + 3*Cos[c + d*x]], x, 3, -((2*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 5])/d) + (4*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], 5])/d}

{Sqrt[Cos[c + d*x]]/Sqrt[2 - 3*Cos[c + d*x]], x, 3, -((2*Sqrt[(2 - 3*Cos[c + d*x])/(-1 - Cos[c + d*x])]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 5])/(d*Sqrt[2 - 3*Cos[c + d*x]])) + (4*Sqrt[(2 - 3*Cos[c + d*x])/(-1 - Cos[c + d*x])]*Sqrt[1 + Cos[c + d*x]]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], 5])/(d*Sqrt[2 - 3*Cos[c + d*x]])}
{Sqrt[Cos[c + d*x]]/Sqrt[-2 - 3*Cos[c + d*x]], x, 3, -((2*Sqrt[-((-2 - 3*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], 1/5])/(Sqrt[5]*d*Sqrt[-2 - 3*Cos[c + d*x]])) + (4*Sqrt[-((-2 - 3*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], 1/5])/(Sqrt[5]*d*Sqrt[-2 - 3*Cos[c + d*x]])}

{Sqrt[Cos[c + d*x]]/Sqrt[3 + 2*Cos[c + d*x]], x, 3, -((2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(3 + 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[3 + 2*Cos[c + d*x]])) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(3 + 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[3 + 2*Cos[c + d*x]])}
{Sqrt[Cos[c + d*x]]/Sqrt[3 - 2*Cos[c + d*x]], x, 3, -((2*Sqrt[(3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[3 - 2*Cos[c + d*x]])) + (4*Sqrt[(3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x])]*Sqrt[1 + Cos[c + d*x]]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[3 - 2*Cos[c + d*x]])}

{Sqrt[Cos[c + d*x]]/Sqrt[-3 + 2*Cos[c + d*x]], x, 3, -((2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(-3 + 2*Cos[c + d*x])/(-1 - Cos[c + d*x])]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[-3 + 2*Cos[c + d*x]])) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(-3 + 2*Cos[c + d*x])/(-1 - Cos[c + d*x])]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -5])/(d*Sqrt[-3 + 2*Cos[c + d*x]])}
{Sqrt[Cos[c + d*x]]/Sqrt[-3 - 2*Cos[c + d*x]], x, 3, -((2*Sqrt[-((-3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[-3 - 2*Cos[c + d*x]])) + (4*Sqrt[-((-3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x]))]*Sqrt[1 + Cos[c + d*x]]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -(1/5)])/(Sqrt[5]*d*Sqrt[-3 - 2*Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(1/2), x, 4, ((a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(1/2), x, 3, -((2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(1/2), x, 1, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(1/2), x, 4, -((2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(1/2), x, 5, (4*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a - 2*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (4*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(3/2), x, 7, ((3*a^2 - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (6*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(3/2), x, 4, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/((a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(3/2), x, 4, -((2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(3/2), x, 5, -((2*(a^2 - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a - 2*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 2*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*b*(5*a^2 - 8*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 6*a*b + 8*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 4*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (2*b*(5*a^2 - 8*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*a*(3*a^2 - 7*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2 - 3*a*b - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*a*(3*a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(5/2), x, 5, -((8*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + 3*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (8*b*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(5/2), x, 5, (2*(3*a^2 + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(5/2), x, 5, -((4*b*(3*a^2 - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2 + 3*a*b - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(5/2), x, 6, -((2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3 - 9*a^2*b - 6*a*b^2 + 8*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)) + (8*b^2*(2*a^2 - b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4 - 9*a^3*b + 16*a^2*b^2 + 12*a*b^3 - 16*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)) + (4*b^2*(5*a^2 - 3*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4 - 13*a^2*b^2 + 8*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/3) (a+b Cos[c+d x])^n*)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(7/3)/(a + b*Cos[c + d*x]), x, 1, (3*Int[(a/3 + (1/3)*b*Cos[c + d*x] - (1/3)*(4*a)*Cos[c + d*x]^2)/(Cos[c + d*x]^(2/3)*(a + b*Cos[c + d*x])), x])/(4*b) + (3*Cos[c + d*x]^(1/3)*Sin[c + d*x])/(4*b*d)}
{Cos[c + d*x]^(5/3)/(a + b*Cos[c + d*x]), x, 0, Int[Cos[c + d*x]^(5/3)/(a + b*Cos[c + d*x]), x]}
{Cos[c + d*x]^(4/3)/(a + b*Cos[c + d*x]), x, 0, Int[Cos[c + d*x]^(4/3)/(a + b*Cos[c + d*x]), x]}
{Cos[c + d*x]^(2/3)/(a + b*Cos[c + d*x]), x, 0, Int[Cos[c + d*x]^(2/3)/(a + b*Cos[c + d*x]), x]}
{Cos[c + d*x]^(1/3)/(a + b*Cos[c + d*x]), x, 0, Int[Cos[c + d*x]^(1/3)/(a + b*Cos[c + d*x]), x]}
{Cos[c + d*x]^(-1/3)/(a + b*Cos[c + d*x]), x, 0, Int[1/(Cos[c + d*x]^(1/3)*(a + b*Cos[c + d*x])), x]}
{Cos[c + d*x]^(-2/3)/(a + b*Cos[c + d*x]), x, 0, Int[1/(Cos[c + d*x]^(2/3)*(a + b*Cos[c + d*x])), x]}
{Cos[c + d*x]^(-4/3)/(a + b*Cos[c + d*x]), x, 1, -((3*Int[(b/3 + (1/3)*(2*a)*Cos[c + d*x] + (1/3)*(2*b)*Cos[c + d*x]^2)/(Cos[c + d*x]^(1/3)*(a + b*Cos[c + d*x])), x])/a) + (3*Sin[c + d*x])/(a*d*Cos[c + d*x]^(1/3))}
{Cos[c + d*x]^(-5/3)/(a + b*Cos[c + d*x]), x, 1, -((3*Int[((2*b)/3 + (1/3)*a*Cos[c + d*x] + (1/3)*b*Cos[c + d*x]^2)/(Cos[c + d*x]^(2/3)*(a + b*Cos[c + d*x])), x])/(2*a)) + (3*Sin[c + d*x])/(2*a*d*Cos[c + d*x]^(2/3))}
{Cos[c + d*x]^(-7/3)/(a + b*Cos[c + d*x]), x, 2, (9*Int[((1/9)*(a^2 + 4*b^2) + (a*b)*Cos[c + d*x] + (1/9)*(8*b^2)*Cos[c + d*x]^2)/(Cos[c + d*x]^(1/3)*(a + b*Cos[c + d*x])), x])/(4*a^2) + (3*Sin[c + d*x])/(4*a*d*Cos[c + d*x]^(4/3)) - (3*b*Sin[c + d*x])/(a^2*d*Cos[c + d*x]^(1/3))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/3) (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(7/3)/Sqrt[a + b*Cos[c + d*x]], x, 1, (6*Int[(a/3 + (1/6)*(5*b)*Cos[c + d*x] - (1/3)*(4*a)*Cos[c + d*x]^2)/(Cos[c + d*x]^(2/3)*Sqrt[a + b*Cos[c + d*x]]), x])/(11*b) + (6*Cos[c + d*x]^(1/3)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(11*b*d)}
{Cos[c + d*x]^(5/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[Cos[c + d*x]^(5/3)/Sqrt[a + b*Cos[c + d*x]], x]}
{Cos[c + d*x]^(4/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[Cos[c + d*x]^(4/3)/Sqrt[a + b*Cos[c + d*x]], x]}
{Cos[c + d*x]^(2/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[Cos[c + d*x]^(2/3)/Sqrt[a + b*Cos[c + d*x]], x]}
{Cos[c + d*x]^(1/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[Cos[c + d*x]^(1/3)/Sqrt[a + b*Cos[c + d*x]], x]}
{Cos[c + d*x]^(-1/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[1/(Cos[c + d*x]^(1/3)*Sqrt[a + b*Cos[c + d*x]]), x]}
{Cos[c + d*x]^(-2/3)/Sqrt[a + b*Cos[c + d*x]], x, 0, Int[1/(Cos[c + d*x]^(2/3)*Sqrt[a + b*Cos[c + d*x]]), x]}
{Cos[c + d*x]^(-4/3)/Sqrt[a + b*Cos[c + d*x]], x, 1, -((3*Int[(-(b/6) + (1/3)*(2*a)*Cos[c + d*x] + (1/6)*(7*b)*Cos[c + d*x]^2)/(Cos[c + d*x]^(1/3)*Sqrt[a + b*Cos[c + d*x]]), x])/a) + (3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(a*d*Cos[c + d*x]^(1/3))}
{Cos[c + d*x]^(-5/3)/Sqrt[a + b*Cos[c + d*x]], x, 1, -((3*Int[(b/6 + (1/3)*a*Cos[c + d*x] + (1/6)*(5*b)*Cos[c + d*x]^2)/(Cos[c + d*x]^(2/3)*Sqrt[a + b*Cos[c + d*x]]), x])/(2*a)) + (3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*a*d*Cos[c + d*x]^(2/3))}
{Cos[c + d*x]^(-7/3)/Sqrt[a + b*Cos[c + d*x]], x, 2, (9*Int[((1/36)*(4*a^2 - 5*b^2) + (1/2)*(a*b)*Cos[c + d*x] + (1/36)*(35*b^2)*Cos[c + d*x]^2)/(Cos[c + d*x]^(1/3)*Sqrt[a + b*Cos[c + d*x]]), x])/(4*a^2) + (3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*a*d*Cos[c + d*x]^(4/3)) - (15*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(8*a^2*d*Cos[c + d*x]^(1/3))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (a+b Cos[c+d x])^(n/3)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(a + b*Cos[c + d*x])^(5/3), x, 1, (3/5)*Int[((1/3)*(5*a^2 + 2*b^2) + (1/3)*(7*a*b)*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/3), x] + (3*b*(a + b*Cos[c + d*x])^(2/3)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^(4/3), x, 1, (3/4)*Int[((1/3)*(4*a^2 + b^2) + (5/3)*a*b*Cos[c + d*x])/(a + b*Cos[c + d*x])^(2/3), x] + (3*b*(a + b*Cos[c + d*x])^(1/3)*Sin[c + d*x])/(4*d)}
{(a + b*Cos[c + d*x])^(2/3), x, 0, Int[(a + b*Cos[c + d*x])^(2/3), x]}
{(a + b*Cos[c + d*x])^(1/3), x, 0, Int[(a + b*Cos[c + d*x])^(1/3), x]}


{(a + b*Cos[c + d*x])^(4/3) - (3*((1/3)*(4*a^2 + b^2) + (5/3)*a*b*Cos[c + d*x]))/(4*(a + b*Cos[c + d*x])^(2/3)), x, 2, (3*b*(a + b*Cos[c + d*x])^(1/3)*Sin[c + d*x])/(4*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{1/(a + b*Cos[c + d*x])^(1/3), x, 0, Int[1/(a + b*Cos[c + d*x])^(1/3), x]}
{1/(a + b*Cos[c + d*x])^(2/3), x, 0, Int[1/(a + b*Cos[c + d*x])^(2/3), x]}
{1/(a + b*Cos[c + d*x])^(4/3), x, 1, -((3*Int[(-(a/3) - (1/3)*(2*b)*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/3), x])/(a^2 - b^2)) - (3*b*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])^(1/3))}
{1/(a + b*Cos[c + d*x])^(5/3), x, 1, Int[1/(a + b*Cos[c + d*x])^(5/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^2, x, 7, -((2*(3*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(3*a^2 + 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (4*a*b*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*a^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2, x, 6, -((4*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*(a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (4*a*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*a^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2, x, 5, -((2*(a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*a^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^2, x, 5, (4*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b^2*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^2, x, 6, (2*(5*a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b^2*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (4*a*b*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^2, x, 7, (12*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(7*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b^2*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (4*a*b*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(7*a^2 + 5*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Cos[c + d*x])^2, x, 8, (2*(9*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (20*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2)) + (4*a*b*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(9*a^2 + 7*b^2)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (20*a*b*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(a + b*Cos[c + d*x])^2, x, 9, (28*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (10*(11*a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*b^2*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2)) + (4*a*b*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2)) + (2*(11*a^2 + 9*b^2)*Sin[c + d*x])/(77*d*Sec[c + d*x]^(5/2)) + (28*a*b*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (10*(11*a^2 + 9*b^2)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(9/2)*(a + b*Cos[c + d*x])^3, x, 8, -((2*b*(9*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*a*(5*a^2 + 21*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(9*a^2 + 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*a*(5*a^2 + 21*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (32*a^2*b*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^3, x, 7, -((6*a*(a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*b*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (6*a*(a^2 + 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (8*a^2*b*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^3, x, 6, -((2*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*a*(a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (16*a^2*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a^2*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3, x, 6, -((2*a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*b*(9*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(3*a^2 - b^2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*a^2*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^3, x, 6, (6*b*(5*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*a*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (8*a*b^2*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*b^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^3, x, 7, (2*a*(5*a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*b*(21*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (32*a*b^2*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*b^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(3/2)) + (2*b*(21*a^2 + 5*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^3, x, 8, (2*b*(27*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*a*(7*a^2 + 15*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (40*a*b^2*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*b^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(5/2)) + (2*b*(27*a^2 + 7*b^2)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*a*(7*a^2 + 15*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x]), x, 8, (2*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a*d) + (2*b^2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d) - (2*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*d) + (2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d)}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x]), x, 6, -((2*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d)) - (2*b*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a + b)*d) + (2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*d)}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x]), x, 2, (2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a + b)*d)}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x]), x, 4, (2*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d) - (2*a*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a + b)*d)}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x]), x, 6, (2*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d) - (2*a*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d) + (2*a^2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d)}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x]), x, 7, -((2*a*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d)) + (2*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^3*d) - (2*a^3*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) + (2*Sin[c + d*x])/(3*b*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^2, x, 9, (b*(4*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + ((2*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d) + (b^2*(7*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) - (b*(4*a^2 - 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((2*a^2 - 5*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^2, x, 8, -(((2*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d)) + (b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) - (b*(5*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*(a + b)^2*d) + ((2*a^2 - 3*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + (b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^2, x, 7, -((b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d)) - (Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a^2 - b^2)*d) + ((3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*(a + b)^2*d) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^2, x, 7, (Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a^2 - b^2)*d) + (a*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) - ((a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b*(a + b)^2*d) - (b*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^2, x, 7, -((a*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d)) + ((a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) - (a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*(a + b)^2*d) + (a*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^2, x, 7, ((3*a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) - (a*(3*a^2 - 4*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) + (a^2*(3*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) - (a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^3, x, 10, (b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*a^3*(a^2 - b^2)^2*d) + (b^2*(63*a^4 - 86*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) - (b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + (b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b^2*(13*a^2 - 7*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^3, x, 9, -(((8*a^4 - 29*a^2*b^2 + 15*b^4)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d)) + (b*(11*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) - (b*(35*a^4 - 38*a^2*b^2 + 15*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*(a + b)^3*d) + ((8*a^4 - 29*a^2*b^2 + 15*b^4)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d) + (b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b^2*(11*a^2 - 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^3, x, 8, -((3*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d)) - ((7*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a^2 - b^2)^2*d) + (3*(5*a^4 - 2*a^2*b^2 + b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*(a + b)^3*d) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + (3*b^2*(3*a^2 - b^2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^3, x, 8, ((5*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a^2 - b^2)^2*d) + (3*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b*(a^2 - b^2)^2*d) - ((3*a^4 + 10*a^2*b^2 - b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b*(a + b)^3*d) - (b*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) - (b*(5*a^2 + b^2)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^3, x, 8, -(((a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b*(a^2 - b^2)^2*d)) + (a*(a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) - ((a^4 - 10*a^2*b^2 - 3*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^2*(a + b)^3*d) + (a*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + ((a^2 + 5*b^2)*Sin[c + d*x])/(4*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^3, x, 8, -((3*a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d)) + ((3*a^4 - 5*a^2*b^2 + 8*b^4)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) - (3*a*(a^4 - 2*a^2*b^2 + 5*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^3*(a + b)^3*d) - (a^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + (3*a*(a^2 - 3*b^2)*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^(1/2), x, 7, -((2*(a + b)*(9*a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2 + 7*a*b - 2*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a*d) + (2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2 - 2*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d)}
{Sec[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d)}
{Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(1/2), x, 5, -((2*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(1/2), x, 4, (2*(a - b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(1/2), x, 8, (a*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((a - 2*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - ((a^2 - 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (a*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(9/2)*(a + b*Cos[c + d*x])^(3/2), x, 8, -((4*b*(a + b)*(41*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3 + 82*a^2*b + 51*a*b^2 - 6*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2 + 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a*d) + (16*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (4*b*(41*a^2 - 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d)}
{Sec[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(a + b)*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2 + 4*a*b + b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(3*a^2 + b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*a*d)}
{Sec[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(3/2), x, 6, -((8*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2 + 4*a*b + 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (8*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d)}
{Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*a*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2 + 2*a*b - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(a - 2*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (6*a*b*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (5*a*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a^2 - a*b + 2*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (5*a*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(3/2), x, 9, ((a + b)*(3*a^2 + 16*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(7*a - 26*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(a^2 - 12*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + (b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + (7*a*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d*Sqrt[Sec[c + d*x]]) + ((3*a^2 + 16*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(11/2)*(a + b*Cos[c + d*x])^(5/2), x, 9, -((2*(a + b)*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4 + 261*a^3*b + 279*a^2*b^2 + 155*a*b^3 - 10*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(163*a^2 + 5*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a*d) + (2*(49*a^2 + 75*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (38*a*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d)}
{Sec[c + d*x]^(9/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*b*(a + b)*(29*a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(21*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(5*a^3 + 29*a^2*b + 27*a*b^2 + 3*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(21*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*a^2 + 9*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (6*a*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*b*(29*a^2 + 3*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(21*a*d)}
{Sec[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a + b)*(9*a^2 + 23*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3 + 17*a^2*b + 23*a*b^2 + 15*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (22*a*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2 + 23*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d)}
{Sec[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, -((14*a*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^3 + 7*a^2*b + 9*a*b^2 - 3*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (14*a*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d)}
{Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, -(((a + b)*(2*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*a*(a^2 + 3*a*b - 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (10*a*b^2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((2*a^2 - b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(5/2), x, 8, (9*a*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^3 - 12*a^2*b + a*b^2 - 2*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(15*a^2 + 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (9*a*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Cos[c + d*x])^(5/2), x, 9, ((a + b)*(33*a^2 + 16*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(24*a^2 - 13*a*b + 38*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (5*a*(a^2 + 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (b^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + (13*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d*Sqrt[Sec[c + d*x]]) + ((33*a^2 + 16*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Cos[c + d*x])^(5/2), x, 10, (a*(a + b)*(15*a^2 + 284*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((59*a^3 - 322*a^2*b + 36*a*b^2 - 72*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*a^4 - 120*a^2*b^2 - 48*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + (b^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sec[c + d*x]^(5/2)) + (17*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d*Sec[c + d*x]^(3/2)) + ((59*a^2 + 36*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*d*Sqrt[Sec[c + d*x]]) + (a*(15*a^2 + 284*b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (4*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a - 2*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d) - (4*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d)}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(1/2), x, 5, -((2*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(1/2), x, 2, (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(1/2), x, 4, -((2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (4*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(1/2), x, 5, ((a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(1/2), x, 8, -((3*a*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + ((a - 2*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d*Sqrt[Sec[c + d*x]]) - (3*a*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*b*(5*a^2 - 8*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 6*a*b + 8*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 4*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) - (2*b*(5*a^2 - 8*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d)}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a - 2*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - 2*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(3/2), x, 5, -((2*b*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(3/2), x, 5, (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*Tan[(1/2)*(c + d*x)])/((a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(3/2), x, 8, ((3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (6*a*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) + ((3*a^2 - b^2)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(5/2), x, 8, (8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4 - 9*a^3*b + 16*a^2*b^2 + 12*a*b^3 - 16*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*b^2*(5*a^2 - 3*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4 - 13*a^2*b^2 + 8*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d) - (8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^4*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3 - 9*a^2*b - 6*a*b^2 + 8*b^3)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (8*b^2*(2*a^2 - b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(5/2), x, 6, -((4*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2 + 3*a*b - 2*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (4*b*(3*a^2 - b^2)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Cos[c + d*x])^(5/2), x, 6, (2*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) + (2*(3*a^2 + b^2)*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Cos[c + d*x])^(5/2), x, 6, -((8*b*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a + 3*b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (8*b*Tan[(1/2)*(c + d*x)])/(3*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*a*(3*a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2 - 3*a*b - 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (2*a*(3*a^2 - 7*b^2)*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}


(* ::Section:: *)
(*Cos[c+d x]^m (A+B Cos[c+d x]) (a+b Cos[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+B Cos[c+d x]) (a+b Cos[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 4, (1/8)*(4*a*A + 3*b*B)*x + (2*(A*b + a*B)*Sin[c + d*x])/(3*d) + ((4*a*A + 3*b*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((A*b + a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*d) + (b*B*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 3, (1/2)*(A*b + a*B)*x + ((3*a*A + 2*b*B)*Sin[c + d*x])/(3*d) + ((A*b + a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (b*B*Cos[c + d*x]^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 2, (1/2)*(2*a*A + b*B)*x + ((A*b + a*B)*Sin[c + d*x])/d + (b*B*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 3, (A*b + a*B)*x + (a*A*ArcTanh[Sin[c + d*x]])/d + (b*B*Sin[c + d*x])/d}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 3, b*B*x + ((A*b + a*B)*ArcTanh[Sin[c + d*x]])/d + (a*A*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 4, ((a*A + 2*b*B)*ArcTanh[Sin[c + d*x]])/(2*d) + ((A*b + a*B)*Tan[c + d*x])/d + (a*A*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 5, ((A*b + a*B)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a*A + 3*b*B)*Tan[c + d*x])/(3*d) + ((A*b + a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (a*A*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 6, ((3*a*A + 4*b*B)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(A*b + a*B)*Tan[c + d*x])/(3*d) + ((3*a*A + 4*b*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((A*b + a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (a*A*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 5, (1/8)*(4*a^2*A + 3*A*b^2 + 6*a*b*B)*x + (2*(10*a*A*b + 5*a^2*B + 4*b^2*B)*Sin[c + d*x])/(15*d) + ((4*a^2*A + 3*A*b^2 + 6*a*b*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((10*a*A*b + 5*a^2*B + 4*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (b*(5*A*b + 6*a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (b*B*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(8*a*A*b + 4*a^2*B + 3*b^2*B)*x + ((4*a^2*A*b + 4*A*b^3 - a^3*B + 8*a*b^2*B)*Sin[c + d*x])/(6*b*d) + ((8*a*A*b - 2*a^2*B + 9*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + ((4*A*b - a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*b*d) + (B*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 3, (1/2)*(2*a^2*A + A*b^2 + 2*a*b*B)*x + (2*(3*a*A*b + a^2*B + b^2*B)*Sin[c + d*x])/(3*d) + (b*(3*A*b + 2*a*B)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 4, ((4*a*A*b + 2*a^2*B + b^2*B)*x)/2 + (a^2*A*ArcTanh[Sin[c + d*x]])/d + (b*(2*A*b + 3*a*B)*Sin[c + d*x])/(2*d) + (b*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 4, (A*b^2 + 2*a*b*B)*x + (a*(2*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(a*A - b*B)*Sin[c + d*x])/d + (a*A*(a + b*Cos[c + d*x])*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 4, b^2*B*x + ((a^2*A + 2*A*b^2 + 4*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(3*A*b + 2*a*B)*Tan[c + d*x])/(2*d) + (a*A*(b + a*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 5, ((2*a*A*b + a^2*B + 2*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a^2*A + 3*A*b^2 + 6*a*b*B)*Tan[c + d*x])/(3*d) + (a*(4*A*b + 3*a*B)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (a*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 6, ((3*a^2*A + 4*A*b^2 + 8*a*b*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((4*a*A*b + 2*a^2*B + 3*b^2*B)*Tan[c + d*x])/(3*d) + ((3*a^2*A + 4*A*b^2 + 8*a*b*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(5*A*b + 4*a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (a*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, (1/16)*(8*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 5*b^3*B)*x + (2*(15*a^2*A*b + 4*A*b^3 + 5*a^3*B + 12*a*b^2*B)*Sin[c + d*x])/(15*d) + ((8*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 5*b^3*B)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((15*a^2*A*b + 4*A*b^3 + 5*a^3*B + 12*a*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (b*(66*a*A*b + 38*a^2*B + 25*b^2*B)*Cos[c + d*x]^3*Sin[c + d*x])/(120*d) + (b*(3*A*b + 4*a*B)*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (b*B*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*(12*a^2*A*b + 3*A*b^3 + 4*a^3*B + 9*a*b^2*B)*x + ((15*a^3*A*b + 60*a*A*b^3 - 3*a^4*B + 52*a^2*b^2*B + 16*b^4*B)*Sin[c + d*x])/(30*b*d) + ((30*a^2*A*b + 45*A*b^3 - 6*a^3*B + 71*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((15*a*A*b - 3*a^2*B + 16*b^2*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*b*d) + ((5*A*b - a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*b*d) + (B*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 4, (1/8)*(8*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*x + ((16*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*Sin[c + d*x])/(6*d) + (b*(20*a*A*b + 6*a^2*B + 9*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + ((4*A*b + 3*a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (B*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 5, ((6*a^2*A*b + A*b^3 + 2*a^3*B + 3*a*b^2*B)*x)/2 + (a^3*A*ArcTanh[Sin[c + d*x]])/d + (b*(15*a*A*b + 11*a^2*B + 4*b^2*B)*Sin[c + d*x])/(6*d) + (b*(3*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (b*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 5, (b*(6*a*A*b + 6*a^2*B + b^2*B)*x)/2 + (a^2*(3*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(2*a^2*A - 2*A*b^2 - 5*a*b*B)*Sin[c + d*x])/(2*d) - (b*(2*a*A - b*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (a*A*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 5, (A*b^3 + 3*a*b^2*B)*x + (a*(a^2*A + 6*A*b^2 + 6*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(5*a*A*b + 2*a^2*B - 2*b^2*B)*Sin[c + d*x])/(2*d) + (a*(2*A*b + a*B)*(a + b*Cos[c + d*x])*Tan[c + d*x])/d + (a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 5, b^3*B*x + ((3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(4*a^2*A + 11*A*b^2 + 15*a*b*B)*Tan[c + d*x])/(6*d) + (a*(5*A*b + 3*a*B)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (a*A*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, ((3*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 8*b^3*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((6*a^2*A*b + 3*A*b^3 + 2*a^3*B + 9*a*b^2*B)*Tan[c + d*x])/(3*d) + (a*(9*a^2*A + 18*A*b^2 + 28*a*b*B)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (a*(3*A*b + 2*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(6*d) + (a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 7, ((9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((8*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 15*b^3*B)*Tan[c + d*x])/(15*d) + ((9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(16*a^2*A + 27*A*b^2 + 45*a*b*B)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + (a*(7*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 7, (1/16)*(8*a^4*A + 36*a^2*A*b^2 + 5*A*b^4 + 24*a^3*b*B + 20*a*b^3*B)*x + (2*(140*a^3*A*b + 112*a*A*b^3 + 35*a^4*B + 168*a^2*b^2*B + 24*b^4*B)*Sin[c + d*x])/(105*d) + ((8*a^4*A + 36*a^2*A*b^2 + 5*A*b^4 + 24*a^3*b*B + 20*a*b^3*B)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((140*a^3*A*b + 112*a*A*b^3 + 35*a^4*B + 168*a^2*b^2*B + 24*b^4*B)*Cos[c + d*x]^2*Sin[c + d*x])/(105*d) + (b*(728*a^2*A*b + 175*A*b^3 + 272*a^3*B + 556*a*b^2*B)*Cos[c + d*x]^3*Sin[c + d*x])/(840*d) + (b*(49*a*A*b + 31*a^2*B + 18*b^2*B)*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d) + (b*(7*A*b + 10*a*B)*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(42*d) + (b*B*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, (1/16)*(32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B)*x + ((24*a^4*A*b + 224*a^2*A*b^3 + 32*A*b^5 - 4*a^5*B + 121*a^3*b^2*B + 128*a*b^4*B)*Sin[c + d*x])/(60*b*d) + ((48*a^3*A*b + 232*a*A*b^3 - 8*a^4*B + 178*a^2*b^2*B + 75*b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(240*d) + ((24*a^2*A*b + 32*A*b^3 - 4*a^3*B + 53*a*b^2*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(120*b*d) + ((24*a*A*b - 4*a^2*B + 25*b^2*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(120*b*d) + ((6*A*b - a*B)*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(30*b*d) + (B*(a + b*Cos[c + d*x])^5*Sin[c + d*x])/(6*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 5, (1/8)*(8*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 16*a^3*b*B + 12*a*b^3*B)*x + ((95*a^3*A*b + 80*a*A*b^3 + 12*a^4*B + 112*a^2*b^2*B + 16*b^4*B)*Sin[c + d*x])/(30*d) + (b*(130*a^2*A*b + 45*A*b^3 + 24*a^3*B + 116*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((35*a*A*b + 12*a^2*B + 16*b^2*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*d) + ((5*A*b + 4*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*d) + (B*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, (1/8)*(32*a^3*A*b + 16*a*A*b^3 + 8*a^4*B + 24*a^2*b^2*B + 3*b^4*B)*x + (a^4*A*ArcTanh[Sin[c + d*x]])/d + (b*(104*a^2*A*b + 16*A*b^3 + 50*a^3*B + 55*a*b^2*B)*Sin[c + d*x])/(24*d) + (b*(32*a*A*b + 26*a^2*B + 9*b^2*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(24*d) + (b*(4*A*b + 7*a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (b*B*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, (1/2)*b*(12*a^2*A*b + A*b^3 + 8*a^3*B + 4*a*b^2*B)*x + (a^3*(4*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(6*a^3*A - 21*a*A*b^2 - 26*a^2*b*B - 4*b^3*B)*Sin[c + d*x])/(6*d) - (b*(6*a^2*A - 3*A*b^2 - 8*a*b*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) - (b*(3*a*A - b*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + (a*A*(a + b*Cos[c + d*x])^3*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, (1/2)*b^2*(8*a*A*b + 12*a^2*B + b^2*B)*x + (a^2*(a^2*A + 12*A*b^2 + 8*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(7*a^2*A*b - 2*A*b^3 + 2*a^3*B - 7*a*b^2*B)*Sin[c + d*x])/(2*d) - (b*(6*a*A*b + 2*a^2*B - b^2*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (a*(5*A*b + 2*a*B)*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/(2*d) + (a*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, (A*b^4 + 4*a*b^3*B)*x + (a*(4*a^2*A*b + 8*A*b^3 + a^3*B + 12*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(4*a^3*A + 26*a*A*b^2 + 21*a^2*b*B - 6*b^3*B)*Sin[c + d*x])/(6*d) + (a*(2*a^2*A + 9*A*b^2 + 9*a*b*B)*(a + b*Cos[c + d*x])*Tan[c + d*x])/(3*d) + (a*(2*A*b + a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (a*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 6, b^4*B*x + ((3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*(55*a^2*A*b + 50*A*b^3 + 16*a^3*B + 104*a*b^2*B)*Tan[c + d*x])/(24*d) + (a*(9*a^2*A + 26*A*b^2 + 32*a*b*B)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(24*d) + (a*(7*A*b + 4*a*B)*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (a*A*(b + a*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 7, ((12*a^3*A*b + 16*a*A*b^3 + 3*a^4*B + 24*a^2*b^2*B + 8*b^4*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((8*a^4*A + 60*a^2*A*b^2 + 15*A*b^4 + 40*a^3*b*B + 60*a*b^3*B)*Tan[c + d*x])/(15*d) + (a*(148*a^2*A*b + 96*A*b^3 + 45*a^3*B + 230*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + (a*(8*a^2*A + 18*A*b^2 + 25*a*b*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(30*d) + (a*(8*A*b + 5*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (a*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^4, x, 8, ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*ArcTanh[Sin[c + d*x]])/(16*d) + ((32*a^3*A*b + 40*a*A*b^3 + 8*a^4*B + 60*a^2*b^2*B + 15*b^4*B)*Tan[c + d*x])/(15*d) + ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (a*(103*a^2*A*b + 56*A*b^3 + 32*a^3*B + 144*a*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + (a*(25*a^2*A + 48*A*b^2 + 72*a*b*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + (a*(3*A*b + 2*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(10*d) + (a*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 5, ((2*a^2*A*b + A*b^3 - 2*a^3*B - a*b^2*B)*x)/(2*b^4) - (2*a^3*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) - ((3*a*A*b - 3*a^2*B - 2*b^2*B)*Sin[c + d*x])/(3*b^3*d) + ((A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) + (B*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 4, -(((2*a*A*b - 2*a^2*B - b^2*B)*x)/(2*b^3)) + (2*a^2*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((A*b - a*B)*Sin[c + d*x])/(b^2*d) + (B*Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, ((A*b - a*B)*x)/b^2 - (2*a*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (B*Sin[c + d*x])/(b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*x)/b + (2*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, -((2*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)) + (A*ArcTanh[Sin[c + d*x]])/(a*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 5, (2*b*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - ((A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^2*d) + (A*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 5, -((2*b^2*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d)) + ((a^2*A + 2*A*b^2 - 2*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - ((A*b - a*B)*Tan[c + d*x])/(a^2*d) + (A*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 6, (2*b^3*(A*b - a*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) - ((a^2*A*b + 2*A*b^3 - a^3*B - 2*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) + ((2*a^2*A + 3*A*b^2 - 3*a*b*B)*Tan[c + d*x])/(3*a^3*d) - ((A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) + (A*Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}


{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 5, -(((4*a*A*b - 6*a^2*B - b^2*B)*x)/(2*b^4)) + (2*a^2*(2*a^2*A*b - 3*A*b^3 - 3*a^3*B + 4*a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) + ((2*a^2*A*b - A*b^3 - 3*a^3*B + 2*a*b^2*B)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) - ((2*a*A*b - 3*a^2*B + b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 4, ((A*b - 2*a*B)*x)/b^3 - (2*a*(a^2*A*b - 2*A*b^3 - 2*a^3*B + 3*a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) - ((a*A*b - 2*a^2*B + b^2*B)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 3, (B*x)/b^2 - (2*(A*b^3 + a^3*B - 2*a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 3, (2*(a*A - b*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) - ((A*b - a*B)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 4, -((2*(2*a^2*A*b - A*b^3 - a^3*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^2*d) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 5, (2*b*(3*a^2*A*b - 2*A*b^3 - 2*a^3*B + a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) - ((2*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2*A - 2*A*b^2 + a*b*B)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, -((2*b^2*(4*a^2*A*b - 3*A*b^3 - 3*a^3*B + 2*a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d)) + ((a^2*A + 6*A*b^2 - 4*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) - ((2*a^2*A*b - 3*A*b^3 - a^3*B + 2*a*b^2*B)*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 + 2*a*b*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^4*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 6, -(((6*a*A*b - 12*a^2*B - b^2*B)*x)/(2*b^5)) + (a^2*(6*a^4*A*b - 15*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 29*a^3*b^2*B - 20*a*b^4*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) + ((6*a^4*A*b - 11*a^2*A*b^3 + 2*A*b^5 - 12*a^5*B + 21*a^3*b^2*B - 6*a*b^4*B)*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) - ((3*a^3*A*b - 6*a*A*b^3 - 6*a^4*B + 10*a^2*b^2*B - b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(2*a^2*A*b - 5*A*b^3 - 4*a^3*B + 7*a*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 5, ((A*b - 3*a*B)*x)/b^4 - (a*(2*a^4*A*b - 5*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 15*a^3*b^2*B - 12*a*b^4*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((2*a^3*A*b - 5*a*A*b^3 - 6*a^4*B + 11*a^2*b^2*B - 2*b^4*B)*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(a^2*A*b - 4*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 4, (B*x)/b^3 + ((a^2*A*b^3 + 2*A*b^5 - 2*a^5*B + 5*a^3*b^2*B - 6*a*b^4*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) + (a*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a*(3*A*b^3 + 2*a^3*B - 5*a*b^2*B)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 4, -(((3*a*A*b - a^2*B - 2*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b + 2*A*b^3 + a^3*B - 4*a*b^2*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 4, ((2*a^2*A + A*b^2 - 3*a*b*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - ((A*b - a*B)*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((3*a*A*b - a^2*B - 2*b^2*B)*Sin[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 5, -(((6*a^4*A*b - 5*a^2*A*b^3 + 2*A*b^5 - 2*a^5*B - a^3*b^2*B)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^3*d) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(5*a^2*A*b - 2*A*b^3 - 3*a^3*B)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 6, (b*(12*a^4*A*b - 15*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 5*a^3*b^2*B - 2*a*b^4*B)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 + 5*a^3*b*B - 2*a*b^3*B)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(6*a^2*A*b - 3*A*b^3 - 4*a^3*B + a*b^2*B)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 7, -((b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d)) + ((a^2*A + 12*A*b^2 - 6*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*a^5*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B)*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(7*a^2*A*b - 4*A*b^3 - 5*a^3*B + 2*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^4*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 6, ((A*b - 4*a*B)*x)/b^5 - (a*(2*a^6*A*b - 7*a^4*A*b^3 + 8*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 28*a^5*b^2*B - 35*a^3*b^4*B + 20*a*b^6*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) - ((6*a^5*A*b - 17*a^3*A*b^3 + 26*a*A*b^5 - 24*a^6*B + 68*a^4*b^2*B - 65*a^2*b^4*B + 6*b^6*B)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) + (a*(A*b - a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (a*(a^2*A*b - 6*A*b^3 - 4*a^3*B + 9*a*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(a^4*A*b - 2*a^2*A*b^3 + 6*A*b^5 - 4*a^5*B + 11*a^3*b^2*B - 12*a*b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 5, (B*x)/b^4 - ((3*a^2*A*b^5 + 2*A*b^7 + 2*a^7*B - 7*a^5*b^2*B + 8*a^3*b^4*B - 8*a*b^6*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) + (a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a*(5*A*b^3 + 3*a^3*B - 8*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(4*a^2*A*b^3 + 11*A*b^5 - 6*a^5*B + 17*a^3*b^2*B - 26*a*b^4*B)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 5, ((a^3*A + 4*a*A*b^2 - 3*a^2*b*B - 2*b^3*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) + (a*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a*(a^2*A*b + 4*A*b^3 + 2*a^3*B - 7*a*b^2*B)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((a^4*A*b - 10*a^2*A*b^3 - 6*A*b^5 + 2*a^5*B - 5*a^3*b^2*B + 18*a*b^4*B)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 5, -(((4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) + (a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((2*a^2*A*b + 3*A*b^3 + a^3*B - 6*a*b^2*B)*Sin[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((2*a^3*A*b + 13*a*A*b^3 + a^4*B - 10*a^2*b^2*B - 6*b^4*B)*Sin[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 5, ((2*a^3*A + 3*a*A*b^2 - 4*a^2*b*B - b^3*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - ((A*b - a*B)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - ((5*a*A*b - 2*a^2*B - 3*b^2*B)*Sin[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((11*a^2*A*b + 4*A*b^3 - 2*a^3*B - 13*a*b^2*B)*Sin[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 6, -(((8*a^6*A*b - 8*a^4*A*b^3 + 7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^4*d) + (b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (b*(8*a^2*A*b - 3*A*b^3 - 5*a^3*B)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (b*(26*a^4*A*b - 17*a^2*A*b^3 + 6*A*b^5 - 11*a^5*B - 4*a^3*b^2*B)*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 7, (b*(20*a^6*A*b - 35*a^4*A*b^3 + 28*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 8*a^5*b^2*B - 7*a^3*b^4*B + 2*a*b^6*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) - ((4*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 + 26*a^5*b*B - 17*a^3*b^3*B + 6*a*b^5*B)*Tan[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (b*(9*a^2*A*b - 4*A*b^3 - 6*a^3*B + a*b^2*B)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (b*(12*a^4*A*b - 11*a^2*A*b^3 + 4*A*b^5 - 6*a^5*B + 2*a^3*b^2*B - a*b^4*B)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^4, x, 8, -((b^2*(40*a^6*A*b - 84*a^4*A*b^3 + 69*a^2*A*b^5 - 20*A*b^7 - 20*a^7*B + 35*a^5*b^2*B - 28*a^3*b^4*B + 8*a*b^6*B)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d)) + ((a^2*A + 20*A*b^2 - 8*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*a^6*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 60*A*b^7 - 6*a^7*B + 65*a^5*b^2*B - 68*a^3*b^4*B + 24*a*b^6*B)*Tan[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (b*(10*a^2*A*b - 5*A*b^3 - 7*a^3*B + 2*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (b*(48*a^4*A*b - 53*a^2*A*b^3 + 20*A*b^5 - 27*a^5*B + 20*a^3*b^2*B - 8*a*b^4*B)*Sec[c + d*x]*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (B*Sin[c + d*x])/d - (B*Sin[c + d*x]^3)/(3*d)}
{Cos[c + d*x]^2*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*x)/2 + (B*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*Sin[c + d*x])/d}
{Cos[c + d*x]^0*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 1, B*x}
{Sec[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*ArcTanh[Sin[c + d*x]])/d}
{Sec[c + d*x]^2*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (B*ArcTanh[Sin[c + d*x]])/(2*d) + (B*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (B*Tan[c + d*x])/d + (B*Tan[c + d*x]^3)/(3*d)}


{Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 5, ((2*a^2 + b^2)*B*x)/(2*b^3) - (2*a^3*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) - (a*B*Sin[c + d*x])/(b^2*d) + (B*Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^2*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 5, -((a*B*x)/b^2) + (2*a^2*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (B*Sin[c + d*x])/(b*d)}
{Cos[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 3, (B*x)/b - (2*a*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^0*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 2, (2*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 4, (-2*b*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d) + (B*ArcTanh[Sin[c + d*x]])/(a*d)}
{Sec[c + d*x]^2*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, (2*b^2*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - (b*B*ArcTanh[Sin[c + d*x]])/(a^2*d) + (B*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, (-2*b^3*B*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) + ((a^2 + 2*b^2)*B*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - (b*B*Tan[c + d*x])/(a^2*d) + (B*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}


{(b*B/a + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (B*x)/b - (2*Sqrt[a^2 - b^2]*B*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*b*d)}
{(a + b*Cos[c + d*x])/(b + a*Cos[c + d*x])^2, x, 2, Sin[c + d*x]/(d*(b + a*Cos[c + d*x]))}
{(3 + Cos[c + d*x])/(2 - Cos[c + d*x]), x, 2, -x + (5*x)/Sqrt[3] + (10*ArcTan[Sin[c + d*x]/(2 + Sqrt[3] - Cos[c + d*x])])/(Sqrt[3]*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+B Cos[c+d x]) (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 9, (2*(a + b)*(24*a^3*A*b + 57*a*A*b^3 - 16*a^4*B - 24*a^2*b^2*B + 147*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(24*a^4*A*b + 51*a^2*A*b^3 - 75*A*b^5 - 16*a^5*B - 20*a^3*b^2*B + 36*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(12*a^2*A*b - 75*A*b^3 - 8*a^3*B - 13*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^3*d) + (2*(9*a*A*b - 6*a^2*B + 49*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(9*A*b + a*B)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*b*d) + (2*B*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 8, -((2*(a + b)*(14*a^2*A*b - 63*A*b^3 - 8*a^3*B - 19*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(14*a^3*A*b - 14*a*A*b^3 - 8*a^4*B - 17*a^2*b^2*B + 25*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(7*a*A*b - 4*a^2*B + 25*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^2*d) + (2*(7*A*b + a*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b*d) + (2*B*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(5*a*A*b - 2*a^2*B + 9*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*A*b - 5*A*b^3 - 2*a^3*B + 2*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*A*b - 2*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b*d) + (2*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*(3*A*b + a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(a^2 - b^2)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 8, (2*(a + b)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 9, -((A*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a*A + 2*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + ((A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 10, -((a + b)*(A*b + 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*A*b + 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A - A*b^2 + 4*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((A*b + 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 11, -((a + b)*(16*a^2*A - 3*A*b^2 + 6*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A - A*b^2 + 18*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A*b + A*b^3 + 8*a^3*B - 2*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A - 3*A*b^2 + 6*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a^2*d) + ((A*b + 6*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 9, -((2*(a + b)*(18*a^3*A*b - 246*a*A*b^3 - 8*a^4*B - 33*a^2*b^2*B - 147*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(18*a^4*A*b - 93*a^2*A*b^3 + 75*A*b^5 - 8*a^5*B - 31*a^3*b^2*B + 39*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*A*b + 75*A*b^3 - 4*a^3*B + 88*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(72*a*A*b + 3*a^2*B + 49*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(9*A*b + 10*a*B)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*d) + (2*b*B*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(a + b)*(21*a^2*A*b + 63*A*b^3 - 6*a^3*B + 82*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(21*a^3*A*b - 21*a*A*b^3 - 6*a^4*B + 31*a^2*b^2*B - 25*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(21*a*A*b - 6*a^2*B + 25*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b*d) + (2*(7*A*b - 2*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*b*d) + (2*B*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(a + b)*(20*a*A*b + 3*a^2*B + 9*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*A*b - 5*A*b^3 + 3*a^3*B - 3*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 9, (2*(a + b)*(3*A*b + 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a*A*b - a^2*B + b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 9, -(((a + b)*(a*A - 2*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a^2*A + 2*A*b^2 + 2*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a*(3*A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a*A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 10, -((a + b)*(5*A*b + 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((7*a*A*b + 4*a^2*B + 8*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 12*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((5*A*b + 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 11, -((a + b)*(16*a^2*A + 3*A*b^2 + 30*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 17*A*b^2 + 42*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a^2*A*b - A*b^3 + 8*a^3*B + 6*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 3*A*b^2 + 30*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a*d) + ((7*A*b + 6*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*d) + (a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 10, -((2*(a + b)*(110*a^4*A*b - 3069*a^2*A*b^3 - 1617*A*b^5 - 40*a^5*B - 255*a^3*b^2*B - 3705*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(110*a^5*A*b - 1364*a^3*A*b^3 + 1254*a*A*b^5 - 40*a^6*B - 245*a^4*b^2*B - 390*a^2*b^4*B + 675*b^6*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(55*a^3*A*b + 1793*a*A*b^3 - 20*a^4*B + 1025*a^2*b^2*B + 675*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b^2*d) + (2*(825*a^2*A*b + 539*A*b^3 + 15*a^3*B + 1145*a*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b*d) + (2*(209*a*A*b + 113*a^2*B + 81*b^2*B)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*d) + (2*b*(11*A*b + 14*a*B)*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(99*d) + (2*b*B*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(a + b)*(45*a^3*A*b + 435*a*A*b^3 - 10*a^4*B + 279*a^2*b^2*B + 147*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(45*a^4*A*b + 30*a^2*A*b^3 - 75*A*b^5 - 10*a^5*B + 124*a^3*b^2*B - 114*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(45*a^2*A*b + 75*A*b^3 - 10*a^3*B + 114*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(45*a*A*b - 10*a^2*B + 49*b^2*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(315*b*d) + (2*(9*A*b - 2*a*B)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(63*b*d) + (2*B*(a + b*Cos[c + d*x])^(7/2)*Sin[c + d*x])/(9*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(a + b)*(161*a^2*A*b + 63*A*b^3 + 15*a^3*B + 145*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(56*a^3*A*b - 56*a*A*b^3 + 15*a^4*B + 10*a^2*b^2*B - 25*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(56*a*A*b + 15*a^2*B + 25*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(7*A*b + 5*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*B*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 10, (2*(a + b)*(35*a*A*b + 23*a^2*B + 9*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(10*a^2*A*b + 5*A*b^3 - 8*a^3*B + 8*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^3*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(5*A*b + 8*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 10, -((a + b)*(3*a^2*A - 6*A*b^2 - 14*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^3*A + 12*a*A*b^2 + 4*a^2*b*B + 2*b^3*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (a^2*(5*A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*(3*a*A - 2*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (a*A*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 10, -((a + b)*(9*a*A*b + 4*a^2*B - 8*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((11*a^2*A*b + 8*A*b^3 + 4*a^3*B + 16*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 20*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(7*A*b + 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 11, -((a + b)*(16*a^2*A + 33*A*b^2 + 54*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^3*A + 59*a*A*b^2 + 66*a^2*b*B + 48*b^3*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((20*a^2*A*b + 5*A*b^3 + 8*a^3*B + 30*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 33*A*b^2 + 54*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*d) + (a*(3*A*b + 2*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(4*d) + (a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 12, -(((a + b)*(284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((356*a^2*A*b + 133*A*b^3 + 128*a^3*B + 472*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 160*a^3*b*B + 40*a*b^3*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(192*a*d) + ((36*a^2*A + 59*A*b^2 + 104*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(96*d) + (a*(11*A*b + 8*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(24*d) + (a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 8, (2*(a + b)*(56*a^2*A*b + 63*A*b^3 - 48*a^3*B - 44*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(56*a^3*A*b + 49*a*A*b^3 - 48*a^4*B - 32*a^2*b^2*B - 25*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(28*a*A*b - 24*a^2*B - 25*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^3*d) + (2*(7*A*b - 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b^2*d) + (2*B*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 7, -((2*(a + b)*(10*a*A*b - 8*a^2*B - 9*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(10*a^2*A*b + 5*A*b^3 - 8*a^3*B - 7*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*A*b - 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^2*d) + (2*B*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*(3*A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b - 2*a^2*B - b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 5, (2*(a + b)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b - a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 5, (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 9, -((A*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - ((A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 10, ((a + b)*(3*A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 - 4*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*A*b - 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^2*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}


{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(40*a^3*A*b - 25*a*A*b^3 - 48*a^4*B + 24*a^2*b^2*B + 9*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)*b^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(40*a^2*A*b + 5*A*b^3 - 48*a^3*B - 12*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(20*a^2*A*b - 5*A*b^3 - 24*a^3*B + 9*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)*d) - (2*(5*a*A*b - 6*a^2*B + b^2*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(6*a*A*b - 8*a^2*B - b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b - 4*a^2*B + b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a*A*b - 2*a^2*B + b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(A*b - a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 7, (-2*(A*b - a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 10, -(((a^2*A - 3*A*b^2 + 2*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 3*A*b^2 + 2*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 11, ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 15*A*b^2 - 12*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a^3*d*Sqrt[a + b*Cos[c + d*x]]) - ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^3*(a^2 - b^2)*d) + (2*b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 5*A*b^2 + 4*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d)}


{Cos[c + d*x]^4*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 9, -((2*(80*a^5*A*b - 140*a^3*A*b^3 + 40*a*A*b^5 - 128*a^6*B + 212*a^4*b^2*B - 55*a^2*b^4*B - 9*b^6*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^2*b^5*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(80*a^4*A*b - 80*a^2*A*b^3 - 5*A*b^5 - 128*a^5*B + 116*a^3*b^2*B + 17*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^5*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(5*a^2*A*b - 9*A*b^3 - 8*a^3*B + 12*a*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(40*a^4*A*b - 65*a^2*A*b^3 + 5*A*b^5 - 64*a^5*B + 98*a^3*b^2*B - 14*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^4*(a^2 - b^2)^2*d) - (2*(30*a^3*A*b - 50*a*A*b^3 - 48*a^4*B + 71*a^2*b^2*B - 3*b^4*B)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(8*a^4*A*b - 15*a^2*A*b^3 + 3*A*b^5 - 16*a^5*B + 28*a^3*b^2*B - 8*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(8*a^3*A*b - 9*a*A*b^3 - 16*a^4*B + 16*a^2*b^2*B + b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^4*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(3*a^2*A*b - 7*A*b^3 - 6*a^3*B + 10*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*a^3*A*b - 8*a*A*b^3 - 8*a^4*B + 13*a^2*b^2*B - b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(2*a^3*A*b - 6*a*A*b^3 - 8*a^4*B + 15*a^2*b^2*B - 3*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2*A*b - 3*A*b^3 - 8*a^3*B + 9*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(a^2*A*b - 5*A*b^3 - 4*a^3*B + 8*a*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A*b + 2*a^2*B - 3*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(4*a*A*b - a^2*B - 3*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(4*a*A*b - a^2*B - 3*b^2*B)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 10, (-2*(7*a^2*A*b - 3*A*b^3 - 4*a^3*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b - a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(7*a^2*A*b - 3*A*b^3 - 4*a^3*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 11, -((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2*A - 5*A*b^2 + 2*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(9*a^2*A*b - 5*A*b^3 - 6*a^3*B + 2*a*b^2*B)*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}
(* {Sec[c + d*x]^3*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 12, ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - ((27*a^2*A*b - 35*A*b^3 - 12*a^3*B + 20*a*b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(12*a^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 35*A*b^2 - 20*a*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^4*d*Sqrt[a + b*Cos[c + d*x]]) - ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(12*a^4*(a^2 - b^2)^2*d) + (2*b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(11*a^2*A*b - 7*A*b^3 - 8*a^3*B + 4*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*A - 54*a^2*A*b^2 + 35*A*b^4 + 36*a^3*b*B - 20*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^2*d)} *)


{Cos[c + d*x]^0*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 3, (2*(a + b)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}


{Cos[c + d*x]^0*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 3, (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 3, (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}


{Cos[c + d*x]^0*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 5, (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*B*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*b*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*B*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Cos[c+d x]) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 7, (2*(9*a*A + 7*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (10*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (10*(A*b + a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(9*a*A + 7*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(A*b + a*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*b*B*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 6, (6*(A*b + a*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(7*a*A + 5*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*a*A + 5*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(A*b + a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*b*B*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 5, (2*(5*a*A + 3*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*b*B*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 4, (2*(A*b + a*B)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(3*a*A + b*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*b*B*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 4, -((2*(a*A - b*B)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/d + (2*a*A*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 5, -((2*(A*b + a*B)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a*A + 3*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*A*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x]), x, 6, -((2*(3*a*A + 5*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*A*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(3*a*A + 5*b*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 8, (2*(9*a^2*A + 7*A*b^2 + 14*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (10*(22*a*A*b + 11*a^2*B + 9*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (10*(22*a*A*b + 11*a^2*B + 9*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(9*a^2*A + 7*A*b^2 + 14*a*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(22*a*A*b + 11*a^2*B + 9*b^2*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(77*d) + (2*b*(11*A*b + 13*a*B)*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(99*d) + (2*b*B*Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 7, (2*(18*a*A*b + 9*a^2*B + 7*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(7*a^2*A + 5*A*b^2 + 10*a*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*a^2*A + 5*A*b^2 + 10*a*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(18*a*A*b + 9*a^2*B + 7*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*b*(9*A*b + 11*a*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*b*B*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 6, (2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*b*(7*A*b + 9*a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*b*B*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 5, (2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(3*a^2*A + A*b^2 + 2*a*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*b*(5*A*b + 7*a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*B*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 5, -((2*(a^2*A - A*b^2 - 2*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(6*a*A*b + 3*a^2*B + b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(3*a*A - b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 5, -((2*(2*a*A*b + a^2*B - b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a^2*A + 3*A*b^2 + 6*a*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*(5*A*b + 3*a*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^2, x, 6, -((2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(2*a*A*b + a^2*B + 3*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*(7*A*b + 5*a*B)*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 8, (2*(27*a^2*A*b + 7*A*b^3 + 9*a^3*B + 21*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(27*a^2*A*b + 7*A*b^3 + 9*a^3*B + 21*a*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*b*(220*a*A*b + 129*a^2*B + 81*b^2*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (2*b*(11*A*b + 15*a*B)*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d) + (2*b*B*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 7, (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*b*(144*a*A*b + 89*a^2*B + 49*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*b*(9*A*b + 13*a*B)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d) + (2*b*B*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, (2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*b*(84*a*A*b + 57*a^2*B + 25*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*b*(7*A*b + 11*a*B)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) + (2*b*B*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, -((2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(9*a^2*A*b + A*b^3 + 3*a^3*B + 3*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(15*a^2*A - 5*A*b^2 - 12*a*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(5*a*A - b*B)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d) + (2*a*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, -((2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(8*a*A*b + 3*a^2*B - b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*(7*A*b + 3*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^3, x, 6, -((2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*(9*a^2*A + 33*A*b^2 + 40*a*b*B)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*a*(9*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*a*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 7, -((2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^3*d)) + (2*(3*a^2*A*b + A*b^3 - 3*a^3*B - a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*d) - (2*a^3*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^4*(a + b)*d) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*d) + (2*B*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 6, (2*(A*b - a*B)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d) - (2*(3*a*A*b - 3*a^2*B - b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^3*d) + (2*a^2*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*B*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 5, (2*B*EllipticE[(1/2)*(c + d*x), 2])/(b*d) + (2*(A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*d) - (2*a*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (2*B*EllipticF[(1/2)*(c + d*x), 2])/(b*d) + (2*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b*(a + b)*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 5, -((2*A*EllipticE[(1/2)*(c + d*x), 2])/(a*d)) - (2*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d) + (2*A*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 7, (2*(A*b - a*B)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d) + (2*A*EllipticF[(1/2)*(c + d*x), 2])/(3*a*d) + (2*b*(A*b - a*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d) + (2*A*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 7, ((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d) - ((9*a^3*A*b - 12*a*A*b^3 - 15*a^4*B + 16*a^2*b^2*B + 2*b^4*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b - 5*A*b^3 - 5*a^3*B + 7*a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^4*(a + b)^2*d) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, -(((a*A*b - 3*a^2*B + 2*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d)) + ((a^2*A*b - 2*A*b^3 - 3*a^3*B + 4*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d) - (a*(a^2*A*b - 3*A*b^3 - 3*a^3*B + 5*a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^3*(a + b)^2*d) + (a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, ((A*b - a*B)*EllipticE[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) + ((a*A*b + a^2*B - 2*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) - ((a^2*A*b + A*b^3 + a^3*B - 3*a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^2*(a + b)^2*d) - ((A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, -(((A*b - a*B)*EllipticE[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d)) - ((A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) + ((3*a^2*A*b - A*b^3 - a^3*B - a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a - b)*b*(a + b)^2*d) + (b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 7, -(((2*a^2*A - 3*A*b^2 + a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d)) + ((A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d) - ((5*a^2*A*b - 3*A*b^3 - 3*a^3*B + a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a - b)*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 + a*b*B)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 8, ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^2*(a^2 - b^2)*d) + (b*(7*a^2*A*b - 5*A*b^3 - 5*a^3*B + 3*a*b^2*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 7, -(((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d)) + ((3*a^4*A*b - 5*a^2*A*b^3 + 8*A*b^5 - 15*a^5*B + 33*a^3*b^2*B - 24*a*b^4*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b - 6*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 38*a^3*b^2*B - 35*a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^4*(a + b)^3*d) + (a*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 7, -(((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d)) + ((a^3*A*b - 7*a*A*b^3 + 3*a^4*B - 5*a^2*b^2*B + 8*b^4*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) - ((a^4*A*b - 10*a^2*A*b^3 - 3*A*b^5 + 3*a^5*B - 6*a^3*b^2*B + 15*a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^3*(a + b)^3*d) + (a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 7, ((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*a*b*(a^2 - b^2)^2*d) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) - ((3*a^4*A*b + 10*a^2*A*b^3 - A*b^5 + a^5*B - 10*a^3*b^2*B - 3*a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b^2*(a + b)^3*d) - ((A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 7, -(((9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d)) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*b*(a^2 - b^2)^2*d) + ((15*a^4*A*b - 6*a^2*A*b^3 + 3*A*b^5 - 3*a^5*B - 10*a^3*b^2*B + a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^2*(a - b)^2*b*(a + b)^3*d) + (b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 8, -(((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d)) + ((11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d) - ((35*a^4*A*b - 38*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 6*a^3*b^2*B - 3*a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^3*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2) + (b*(11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^3, x, 9, ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^3*(a^2 - b^2)^2*d) + (b*(63*a^4*A*b - 86*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 38*a^3*b^2*B - 15*a*b^4*B)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2) + (b*(13*a^2*A*b - 7*A*b^3 - 9*a^3*B + 3*a*b^2*B)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^(5/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (6*B*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*B*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (2*B*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*B*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (2*B*EllipticE[(1/2)*(c + d*x), 2])/d}
{Cos[c + d*x]^(-1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 2, (2*B*EllipticF[(1/2)*(c + d*x), 2])/d}
{Cos[c + d*x]^(-3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, -((2*B*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*B*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x]), x, 3, (2*B*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*B*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}


{Cos[c + d*x]^(5/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 7, -((2*a*B*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d)) + (2*(3*a^2 + b^2)*B*EllipticF[(1/2)*(c + d*x), 2])/(3*b^3*d) - (2*a^3*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*B*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^(3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, (2*B*EllipticE[(1/2)*(c + d*x), 2])/(b*d) - (2*a*B*EllipticF[(1/2)*(c + d*x), 2])/(b^2*d) + (2*a^2*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d)}
{Cos[c + d*x]^(1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 4, (2*B*EllipticF[(1/2)*(c + d*x), 2])/(b*d) - (2*a*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b*(a + b)*d)}
{Cos[c + d*x]^(-1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 2, (2*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a + b)*d)}
{Cos[c + d*x]^(-3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 6, -((2*B*EllipticE[(1/2)*(c + d*x), 2])/(a*d)) - (2*b*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d) + (2*B*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^2, x, 8, (2*b*B*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d) + (2*B*EllipticF[(1/2)*(c + d*x), 2])/(3*a*d) + (2*b^2*B*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d) + (2*B*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*b*B*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Cos[c+d x]) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 8, ((a + b)*(6*a*A*b - 3*a^2*B + 16*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*A*b - 12*A*b^2 + a^2*B - 14*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((2*a^2*A*b - 8*A*b^3 - a^3*B - 4*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d) + (B*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((6*a*A*b - 3*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b^2*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*(4*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A - a*B + 2*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + a*B - b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 5, -((2*(a + b)*(A*b + 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + 3*a*B + 3*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 5*a^2*B + 5*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/2), x, 7, -((2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 63*a^3*B + 49*a^2*b*B - 14*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Cos[c + d*x]^(3/2)) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 9, ((a + b)*(24*a^2*A*b + 128*A*b^3 - 9*a^3*B + 156*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(192*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((56*a^2*A*b - 208*a*A*b^2 + 3*a^3*B - 114*a^2*b*B + 36*a*b^2*B - 72*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(96*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*a^3*A*b - 96*a*A*b^3 - 3*a^4*B - 24*a^2*b^2*B - 48*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((56*a*A*b + 3*a^2*B + 36*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b*d) + ((8*A*b + 9*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d) + (b*B*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + ((24*a^2*A*b + 128*A*b^3 - 9*a^3*B + 156*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b^2*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 8, ((a + b)*(30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((24*a^2*A - 6*a*A*b + 12*A*b^2 - 7*a^2*B + 26*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*A*b + 7*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d) + (b*B*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 7, ((a + b)*(4*A*b + 5*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A - 8*a*A*b - 4*a^2*B + a*b*B - 2*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a*A*b + 3*a^2*B + 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 7, -(((a + b)*(2*a*A - b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 2*a*A*b - A*b^2 + a^2*B - 2*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*A*b + 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((2*a*A - b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(a + b)*(4*A*b + 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*B + 6*a*b*B - 3*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(4*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 12*a*A*b + 3*A*b^2 + 5*a^2*B + 20*a*b*B + 15*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(6*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 63*a^3*B + 84*a^2*b*B + 21*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(8*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a*d*Cos[c + d*x]^(3/2)) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 75*a^4*B + 246*a^3*b*B + 153*a^2*b^2*B - 18*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(10*A*b + 9*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(5/2)) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Cos[c + d*x]^(3/2)) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 10, ((a + b)*(150*a^3*A*b + 2840*a*A*b^3 - 45*a^4*B + 1692*a^2*b^2*B + 1024*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((590*a^3*A*b - 3220*a^2*A*b^2 + 360*a*A*b^3 - 720*A*b^4 + 15*a^4*B - 1146*a^3*b*B + 772*a^2*b^2*B - 2312*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((10*a^4*A*b - 240*a^2*A*b^3 - 96*A*b^5 - 3*a^5*B - 40*a^3*b^2*B - 240*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((590*a^2*A*b + 360*A*b^3 + 15*a^3*B + 772*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d) + ((170*a*A*b + 93*a^2*B + 64*b^2*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d) + (b*(10*A*b + 13*a*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(40*d) + (b*B*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d) + ((150*a^3*A*b + 2840*a*A*b^3 - 45*a^4*B + 1692*a^2*b^2*B + 1024*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(1920*b^2*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 9, ((a + b)*(264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((192*a^3*A - 104*a^2*A*b + 304*a*A*b^2 - 59*a^3*B + 322*a^2*b*B - 36*a*b^2*B + 72*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*d) + (b*(8*A*b + 11*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d) + (b*B*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, ((a + b)*(54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a^3*A - 72*a^2*A*b + 6*a*A*b^2 - 12*A*b^3 - 24*a^3*B + 13*a^2*b*B - 38*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(2*A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (b*B*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, -(((a + b)*(8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^3*A + 12*a^2*A*b - 12*a*A*b^2 + 4*a^3*B - 12*a^2*b*B + a*b^2*B - 2*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*a*A - b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, -(((a + b)*(14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^3*A + 7*a^2*A*b + 9*a*A*b^2 - 3*A*b^3 + 3*a^3*B + 9*a^2*b*B - 9*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(2*A*b + 5*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(2*A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - ((14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d)}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*(a + b)*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 5*a^3*B + 35*a^2*b*B + 45*a*b^2*B - 15*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(8*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 145*a^2*A*b + 135*a*A*b^2 + 15*A*b^3 + 63*a^3*B + 119*a^2*b*B + 161*a*b^2*B + 105*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(10*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 75*a^4*B + 435*a^3*b*B + 405*a^2*b^2*B + 45*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(4*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(3/2)) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-13/2)*(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 9, -((2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3465*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(3465*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(675*a^5*A + 3705*a^4*A*b + 3315*a^3*A*b^2 + 255*a^2*A*b^3 + 10*a*A*b^4 + 40*A*b^5 + 1617*a^5*B + 2871*a^4*b*B + 3069*a^3*b^2*B + 1705*a^2*b^3*B - 110*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (2*a*(14*A*b + 11*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(99*d*Cos[c + d*x]^(9/2)) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*d*Cos[c + d*x]^(7/2)) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*a*d*Cos[c + d*x]^(5/2)) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*a^2*d*Cos[c + d*x]^(3/2)) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(11*d*Cos[c + d*x]^(11/2)) + (2*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3465*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(-5/2)*(3*b*(B/(2*a)) + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a + b)*(a^2 + 3*b^2)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((2*a^4 + 7*a^3*b + a^2*b^2 + 9*a*b^3 - 3*b^4)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(5*a^2 + 3*b^2)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (b*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(d*Cos[c + d*x]^(3/2)) + (2*(a^2 + 3*b^2)*B*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Cos[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*(4*A*b - 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((a - 2*b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A*b - 3*a^2*B - 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d) + ((4*A*b - 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^2*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 3, (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 4, -((2*A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A + B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 5, (2*(a + b)*(2*A*b - 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(2*A*b - 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 5*a^2*B - 10*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 7, -(((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 4, -((2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 5, -((2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A - 2*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*B - 6*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 8, -(((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2*A*b - 3*a*A*b^2 - 3*A*b^3 - 5*a^3*B + 3*a^2*b*B + 6*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - 5*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(2*a^2*A*b - 6*A*b^3 - 5*a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A*b + 3*A*b^2 + 2*a^2*B - 3*a*b*B - 3*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 5, (2*(3*a^2*A + A*b^2 - 4*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A + A*b - a*B - 3*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(3*a^2*A + A*b^2 - 4*a*b*B)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 5, -((2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 6, -((2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 + 3*a^3*B + 3*a^2*b*B - 2*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 9*a^3*A*b + 16*a^2*A*b^2 + 12*a*A*b^3 - 16*A*b^4 + 3*a^4*B - 9*a^3*b*B - 6*a^2*b^2*B + 8*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 5, ((a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^(1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 4, -((2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (4*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 2, (2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a*B + b*B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(3/2), x, 5, -((2*(a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+B Cos[c+d x]) (a+b Cos[c+d x])^(n/3)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(2/3), x, 1, (3/5)*Int[((1/3)*(5*a*A + 2*b*B) + (1/3)*(5*A*b + 2*a*B)*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/3), x] + (3*B*(a + b*Cos[c + d*x])^(2/3)*Sin[c + d*x])/(5*d)}
{(A + B*Cos[c + d*x])*(a + b*Cos[c + d*x])^(1/3), x, 1, Int[(a + b*Cos[c + d*x])^(1/3)*(A + B*Cos[c + d*x]), x]}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/3), x, 0, Int[(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(1/3), x]}
{(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(2/3), x, 0, Int[(A + B*Cos[c + d*x])/(a + b*Cos[c + d*x])^(2/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Cos[c+d x]) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a*A + 5*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(3*a*A + 5*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(A*b + a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*a*A*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 6, (-2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(a*A + 3*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(A*b + a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*a*A*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 5, (-2*(a*A - b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*a*A*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]], x, 5, (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(3*a*A + b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b*B*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + B*Cos[c + d*x]))/Sqrt[Sec[c + d*x]], x, 6, (2*(5*a*A + 3*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b*B*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + B*Cos[c + d*x]))/Sec[c + d*x]^(3/2), x, 7, (6*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(7*a*A + 5*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*B*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(7*a*A + 5*b*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x])*Sec[c + d*x]^(9/2), x, 8, -((2*(6*a*A*b + 3*a^2*B + 5*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(6*a*A*b + 3*a^2*B + 5*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*a*(9*A*b + 7*a*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(2*a*A*b + a^2*B + 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*a*(7*A*b + 5*a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*a*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 6, (-2*(2*a*A*b + a^2*B - b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*(5*A*b + 3*a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 6, (-2*(a^2*A - A*b^2 - 2*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(6*a*A*b + 3*a^2*B + b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(3*a*A - b*B)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]], x, 6, (2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(3*a^2*A + A*b^2 + 2*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b*(5*A*b + 7*a*B)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*b*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x]))/Sqrt[Sec[c + d*x]], x, 7, (2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(7*A*b + 9*a*B)*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*b*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(3/2)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x]))/Sec[c + d*x]^(3/2), x, 8, (2*(18*a*A*b + 9*a^2*B + 7*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(7*a^2*A + 5*A*b^2 + 10*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(9*A*b + 11*a*B)*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*b*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(5/2)) + (2*(18*a*A*b + 9*a^2*B + 7*b^2*B)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(7*a^2*A + 5*A*b^2 + 10*a*b*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*a*(49*a^2*A + 89*A*b^2 + 144*a*b*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*a*(13*A*b + 9*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sec[c + d*x]^(9/2), x, 8, -((2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*a*(25*a^2*A + 57*A*b^2 + 84*a*b*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*a*(11*A*b + 7*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*(9*a^2*A + 33*A*b^2 + 40*a*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a*(9*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 7, (-2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(8*a*A*b + 3*a^2*B - b^2*B)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*a*(7*A*b + 3*a*B)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 7, (-2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(9*a^2*A*b + A*b^3 + 3*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(15*a^2*A - 5*A*b^2 - 12*a*b*B)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(5*a*A - b*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]], x, 7, (2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(84*a*A*b + 57*a^2*B + 25*b^2*B)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*b*(7*A*b + 11*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Sqrt[Sec[c + d*x]]) + (2*b*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x]))/Sqrt[Sec[c + d*x]], x, 8, (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(144*a*A*b + 89*a^2*B + 49*b^2*B)*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*b*(9*A*b + 13*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d*Sec[c + d*x]^(3/2)) + (2*b*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(3/2)) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x]))/Sec[c + d*x]^(3/2), x, 9, (2*(27*a^2*A*b + 7*A*b^3 + 9*a^3*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*b*(220*a*A*b + 129*a^2*B + 81*b^2*B)*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (2*b*(11*A*b + 15*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d*Sec[c + d*x]^(5/2)) + (2*b*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d*Sec[c + d*x]^(5/2)) + (2*(27*a^2*A*b + 7*A*b^3 + 9*a^3*B + 21*a*b^2*B)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{((A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x]), x, 8, (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*A*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*a*d) + (2*b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d) - (2*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*d) + (2*A*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d)}
{((A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]), x, 6, (-2*A*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*(a + b)*d) + (2*A*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*d)}
{((A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x]), x, 4, (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*d) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*(a + b)*d)}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]), x, 6, (2*B*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*d) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*d) - (2*a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d)}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)), x, 7, (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*d) - (2*(3*a*A*b - 3*a^2*B - b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^3*d) + (2*a^2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) + (2*B*Sin[c + d*x])/(3*b*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)), x, 8, (-2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*b^3*d) + (2*(3*a^2*A*b + A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^4*d) - (2*a^3*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^4*(a + b)*d) + (2*B*Sin[c + d*x])/(5*b*d*Sec[c + d*x]^(3/2)) + (2*(A*b - a*B)*Sin[c + d*x])/(3*b^2*d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^2, x, 9, ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d) + (b*(7*a^2*A*b - 5*A*b^3 - 5*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) - ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^2, x, 8, -(((2*a^2*A - 3*A*b^2 + a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d)) + ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) - ((5*a^2*A*b - 3*A*b^3 - 3*a^3*B + a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 + a*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^2, x, 7, -(((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d)) - ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) + ((3*a^2*A*b - A*b^3 - a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b*(a + b)^2*d) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]), x, 7, ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) + ((a*A*b + a^2*B - 2*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) - ((a^2*A*b + A*b^3 + a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*(a + b)^2*d) - ((A*b - a*B)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)), x, 7, -(((a*A*b - 3*a^2*B + 2*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d)) + ((a^2*A*b - 2*A*b^3 - 3*a^3*B + 4*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) - (a*(a^2*A*b - 3*A*b^3 - 3*a^3*B + 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)), x, 8, ((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) - ((9*a^3*A*b - 12*a*A*b^3 - 15*a^4*B + 16*a^2*b^2*B + 2*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^4*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b - 5*A*b^3 - 5*a^3*B + 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^4*(a + b)^2*d) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^3, x, 10, ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(12*a^3*(a^2 - b^2)^2*d) + (b*(63*a^4*A*b - 86*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 38*a^3*b^2*B - 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) - ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(13*a^2*A*b - 7*A*b^3 - 9*a^3*B + 3*a*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^3, x, 9, -((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) + ((11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) - ((35*a^4*A*b - 38*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 6*a^3*b^2*B - 3*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (b*(11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x])*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^3, x, 8, -((9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*b*(a^2 - b^2)^2*d) + ((15*a^4*A*b - 6*a^2*A*b^3 + 3*A*b^5 - 3*a^5*B - 10*a^3*b^2*B + a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*b*(a + b)^3*d) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + (b*(9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]), x, 8, ((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*b*(a^2 - b^2)^2*d) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) - ((3*a^4*A*b + 10*a^2*A*b^3 - A*b^5 + a^5*B - 10*a^3*b^2*B - 3*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b^2*(a + b)^3*d) - ((A*b - a*B)*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) - ((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)), x, 8, -((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) + ((a^3*A*b - 7*a*A*b^3 + 3*a^4*B - 5*a^2*b^2*B + 8*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) - ((a^4*A*b - 10*a^2*A*b^3 - 3*A*b^5 + 3*a^5*B - 6*a^3*b^2*B + 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^3*(a + b)^3*d) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + ((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)), x, 8, -((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) + ((3*a^4*A*b - 5*a^2*A*b^3 + 8*A*b^5 - 15*a^5*B + 33*a^3*b^2*B - 24*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b - 6*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 38*a^3*b^2*B - 35*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^4*(a + b)^3*d) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)) + (a*(a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)), x, 9, ((15*a^4*A*b - 29*a^2*A*b^3 + 8*A*b^5 - 35*a^5*B + 65*a^3*b^2*B - 24*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) - ((45*a^5*A*b - 99*a^3*A*b^3 + 72*a*A*b^5 - 105*a^6*B + 223*a^4*b^2*B - 128*a^2*b^4*B - 8*b^6*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*b^5*(a^2 - b^2)^2*d) + (a^2*(15*a^4*A*b - 38*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 86*a^3*b^2*B - 63*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^5*(a + b)^3*d) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)) + (a*(3*a^2*A*b - 9*A*b^3 - 7*a^3*B + 13*a*b^2*B)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) - ((15*a^3*A*b - 33*a*A*b^3 - 35*a^4*B + 61*a^2*b^2*B - 8*b^4*B)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


{((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x]), x, 4, (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*B*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]), x, 4, -((2*B*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*B*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{((a*B + b*B*Cos[c + d*x])*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x]), x, 3, (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d}
{(a*B + b*B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]), x, 3, (2*B*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d}
{(a*B + b*B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)), x, 4, (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*B*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{(a*B + b*B*Cos[c + d*x])/((a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)), x, 4, (6*B*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*B*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Cos[c+d x]) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])*Sec[c + d*x]^(9/2), x, 8, -((2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 63*a^3*B + 49*a^2*b*B - 14*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a^2*d) + (2*(A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 7, -((2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 5*a^2*B + 5*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 6, (-2*(a + b)*(A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A + A*b + 3*a*B + 3*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*a*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 7, -((2*A*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + a*B - b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])*Sec[c + d*x]^(1/2), x, 8, ((a + b)*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(d*Sqrt[Sec[c + d*x]])}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])/Sec[c + d*x]^(1/2), x, 8, ((a + b)*(4*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A - a*B + 2*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + ((4*A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b*d*Sqrt[Sec[c + d*x]])}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x])/Sec[c + d*x]^(3/2), x, 9, ((a + b)*(6*a*A*b - 3*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*A*b - 12*A*b^2 + a^2*B - 14*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((2*a^2*A*b - 8*A*b^3 - a^3*B - 4*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + ((6*A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d*Sqrt[Sec[c + d*x]]) + ((6*a*A*b - 3*a^2*B + 16*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^2*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 75*a^4*B + 246*a^3*b*B + 153*a^2*b^2*B - 18*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*a*d) + (2*(10*A*b + 9*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^3*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(9/2), x, 8, -((2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 63*a^3*B + 84*a^2*b*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a*d) + (2*(8*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 7, -((2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 12*a*A*b + 3*A*b^2 + 5*a^2*B + 20*a*b*B + 15*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(6*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 8, (-2*(a + b)*(4*A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*B + 6*a*b*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*(4*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 8, -(((a + b)*(2*a*A - b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 2*a*A*b - A*b^2 + a^2*B - 2*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((2*a*A - b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(1/2), x, 8, ((a + b)*(4*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A - 8*a*A*b - 4*a^2*B + a*b*B - 2*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a*A*b + 3*a^2*B + 4*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + ((4*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])/Sec[c + d*x]^(1/2), x, 9, ((a + b)*(30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((24*a^2*A - 6*a*A*b + 12*A*b^2 - 7*a^2*B + 26*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + (b*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + ((6*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d*Sqrt[Sec[c + d*x]]) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x])/Sec[c + d*x]^(3/2), x, 10, ((a + b)*(24*a^2*A*b + 128*A*b^3 - 9*a^3*B + 156*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((56*a^2*A*b - 208*a*A*b^2 + 3*a^3*B - 114*a^2*b*B + 36*a*b^2*B - 72*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*a^3*A*b - 96*a*A*b^3 - 3*a^4*B - 24*a^2*b^2*B - 48*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sec[c + d*x]^(5/2)) + ((8*A*b + 9*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d*Sec[c + d*x]^(3/2)) + ((56*a*A*b + 3*a^2*B + 36*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b*d*Sqrt[Sec[c + d*x]]) + ((24*a^2*A*b + 128*A*b^3 - 9*a^3*B + 156*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b^2*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(13/2), x, 10, -((2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3465*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(3465*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(675*a^5*A + 3705*a^4*A*b + 3315*a^3*A*b^2 + 255*a^2*A*b^3 + 10*a*A*b^4 + 40*A*b^5 + 1617*a^5*B + 2871*a^4*b*B + 3069*a^3*b^2*B + 1705*a^2*b^3*B - 110*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3465*a^2*d) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3465*a*d) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(693*d) + (2*a*(14*A*b + 11*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(99*d) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(11/2)*Sin[c + d*x])/(11*d) + (2*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3465*a^3*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 75*a^4*B + 435*a^3*b*B + 405*a^2*b^2*B + 45*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a*d) + (2*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*a*(4*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(21*d) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(9/2), x, 8, -((2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 145*a^2*A*b + 135*a*A*b^2 + 15*A*b^3 + 63*a^3*B + 119*a^2*b*B + 161*a*b^2*B + 105*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*a*(10*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(7/2), x, 9, -((2*(a + b)*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 5*a^3*B + 35*a^2*b*B + 45*a*b^2*B - 15*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(8*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2), x, 9, -((a + b)*(14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^3*A + 7*a^2*A*b + 9*a*A*b^2 - 3*A*b^3 + 3*a^3*B + 9*a^2*b*B - 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(2*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(2*A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) - ((14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2), x, 9, -((a + b)*(8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^3*A + 12*a^2*A*b - 12*a*A*b^2 + 4*a^3*B - 12*a^2*b*B + a*b^2*B - 2*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*a*A - b*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])*Sec[c + d*x]^(1/2), x, 9, ((a + b)*(54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a^3*A - 72*a^2*A*b + 6*a*A*b^2 - 12*A*b^3 - 24*a^3*B + 13*a^2*b*B - 38*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(2*A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) + (b*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])/Sec[c + d*x]^(1/2), x, 10, ((a + b)*(264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((192*a^3*A - 104*a^2*A*b + 304*a*A*b^2 - 59*a^3*B + 322*a^2*b*B - 36*a*b^2*B + 72*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(8*A*b + 11*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d*Sec[c + d*x]^(3/2)) + (b*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d*Sec[c + d*x]^(3/2)) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*d*Sqrt[Sec[c + d*x]]) + ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x])/Sec[c + d*x]^(3/2), x, 11, ((a + b)*(150*a^3*A*b + 2840*a*A*b^3 - 45*a^4*B + 1692*a^2*b^2*B + 1024*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((590*a^3*A*b - 3220*a^2*A*b^2 + 360*a*A*b^3 - 720*A*b^4 + 15*a^4*B - 1146*a^3*b*B + 772*a^2*b^2*B - 2312*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((10*a^4*A*b - 240*a^2*A*b^3 - 96*A*b^5 - 3*a^5*B - 40*a^3*b^2*B - 240*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(10*A*b + 13*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(40*d*Sec[c + d*x]^(5/2)) + (b*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(5/2)) + ((170*a*A*b + 93*a^2*B + 64*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d*Sec[c + d*x]^(3/2)) + ((590*a^2*A*b + 360*A*b^3 + 15*a^3*B + 772*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d*Sqrt[Sec[c + d*x]]) + ((150*a^3*A*b + 2840*a*A*b^3 - 45*a^4*B + 1692*a^2*b^2*B + 1024*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(1920*b^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(7/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 7, -((2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 5*a^2*B - 10*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a^2*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a*d) + (2*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^3*d)}
{Sec[c + d*x]^(5/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 6, (2*(a + b)*(2*A*b - 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d) - (2*(2*A*b - 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d)}
{Sec[c + d*x]^(3/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 5, -((2*A*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A + B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Sec[c + d*x]^(1/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 4, (2*(A - B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 8, ((a + b)*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*A*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(A + B*Cos[c + d*x])/Sqrt[a + b*Cos[c + d*x]], x, 8, ((a + b)*(4*A*b - 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((a - 2*b)*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A*b - 3*a^2*B - 4*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d*Sqrt[Sec[c + d*x]]) + ((4*A*b - 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^2*d*Sqrt[Sec[c + d*x]])}


{(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*B - 6*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) - (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)*d)}
{(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (-2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(a^2*(a^2 - b^2)*d)}
{(A + B*Cos[c + d*x])*Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(3/2), x, 5, (-2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A - B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Tan[(c + d*x)/2])/(a*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/(Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(3/2)), x, 7, (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A - B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b - a*B)*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/(Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)), x, 8, -(((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) - ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{(A + B*Cos[c + d*x])*Sec[c + d*x]^(5/2)/(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 9*a^3*A*b + 16*a^2*A*b^2 + 12*a*A*b^3 - 16*A*b^4 + 3*a^4*B - 9*a^3*b*B - 6*a^2*b^2*B + 8*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d) - (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*a^4*(a^2 - b^2)^2*d)}
{(A + B*Cos[c + d*x])*Sec[c + d*x]^(3/2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (-2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 + 3*a^3*B + 3*a^2*b*B - 2*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)^2*d)}
{(A + B*Cos[c + d*x])*Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(5/2), x, 6, (-2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Tan[(c + d*x)/2])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(1/2)), x, 6, (2*(3*a^2*A + A*b^2 - 4*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A + A*b - a*B - 3*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - a*B)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A + A*b^2 - 4*a*b*B)*Tan[(c + d*x)/2])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(3/2)), x, 8, (-2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A*b + 3*A*b^2 + 2*a^2*B - 3*a*b*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Tan[(c + d*x)/2])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x])/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(5/2)), x, 9, -((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*a^2*A*b - 3*a*A*b^2 - 3*A*b^3 - 5*a^3*B + 3*a^2*b*B + 6*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b - 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)) + (2*a*(2*a^2*A*b - 6*A*b^3 - 5*a^3*B + 9*a*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) - ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


{(a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^(1/2)/(a + b*Cos[c + d*x])^(3/2), x, 3, (2*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{(a*B + b*B*Cos[c + d*x])/(Sec[c + d*x]^(1/2)*(a + b*Cos[c + d*x])^(3/2)), x, 5, -((2*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (4*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])}
{(a*B + b*B*Cos[c + d*x])/(Sec[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)), x, 6, ((a + b)*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d*Sqrt[Sec[c + d*x]])}


(* ::Section:: *)
(*Cos[c+d x]^m (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^2*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 5, (a*(4*A + 3*C)*x)/8 + (2*b*(5*A + 4*C)*Sin[c + d*x])/(15*d) + (a*(4*A + 3*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (b*(5*A + 4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*C*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 4, (b*(4*A + 3*C)*x)/8 + (a*(3*A + 2*C)*Sin[c + d*x])/(3*d) + (b*(4*A + 3*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*C*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 3, (1/2)*a*(2*A + C)*x + ((3*A*b^2 - a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b*d) - (a*C*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 4, (1/2)*b*(2*A + C)*x + (a*A*ArcTanh[Sin[c + d*x]])/d + (a*C*Sin[c + d*x])/(2*d) + (C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 4, a*C*x + (A*b*ArcTanh[Sin[c + d*x]])/d - (b*(A - C)*Sin[c + d*x])/d + (A*(a + b*Cos[c + d*x])*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 4, b*C*x + (a*(A + 2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (A*b*Tan[c + d*x])/(2*d) + (A*(b + a*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 5, (b*(A + 2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(2*A + 3*C)*Tan[c + d*x])/(3*d) + (A*b*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 6, (a*(3*A + 4*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (b*(2*A + 3*C)*Tan[c + d*x])/(3*d) + (a*(3*A + 4*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (A*b*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 7, (b*(3*A + 4*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*a*(4*A + 5*C)*Tan[c + d*x])/(15*d) + (b*(3*A + 4*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(4*A + 5*C)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (A*b*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 6, ((8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*x)/16 + (4*a*b*(5*A + 4*C)*Sin[c + d*x])/(15*d) + ((8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (2*a*b*(5*A + 4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + ((30*A*b^2 + 2*a^2*C + 25*b^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(120*d) + (a*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 5, (a*b*(4*A + 3*C)*x)/4 + ((15*a^2*A + 10*A*b^2 + 10*a^2*C + 8*b^2*C)*Sin[c + d*x])/(15*d) + (a*b*(4*A + 3*C)*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((10*A*b^2 + a^2*C + 8*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(30*d) + (a*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(10*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 4, (1/8)*(8*a^2*A + 4*A*b^2 + 4*a^2*C + 3*b^2*C)*x + (a*(12*A*b^2 - a^2*C + 8*b^2*C)*Sin[c + d*x])/(6*b*d) + ((12*A*b^2 - 2*a^2*C + 9*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) - (a*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*b*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 5, (2*a*A*b + a*b*C)*x + (a^2*A*ArcTanh[Sin[c + d*x]])/d + ((3*A*b^2 + a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*d) + (a*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 5, (1/2)*(2*A*b^2 + 2*a^2*C + b^2*C)*x + (2*a*A*b*ArcTanh[Sin[c + d*x]])/d - (a*b*(2*A - 3*C)*Sin[c + d*x])/(2*d) - (b*(2*A - C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 5, 2*a*b*C*x + ((a^2*A + 2*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b^2*(3*A - 2*C)*Sin[c + d*x])/(2*d) + (A*b*(a + b*Cos[c + d*x])*Tan[c + d*x])/d + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 5, b^2*C*x + (a*b*(A + 2*C)*ArcTanh[Sin[c + d*x]])/d + ((2*a^2*A + A*b^2 + 3*a^2*C)*Tan[c + d*x])/(3*d) + (A*b*(b + a*Sec[c + d*x])*Tan[c + d*x])/(3*d) + (A*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 6, ((3*a^2*A + 4*A*b^2 + 4*a^2*C + 8*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*a*b*(2*A + 3*C)*Tan[c + d*x])/(3*d) + ((9*a^2*A + 2*A*b^2 + 12*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (A*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(6*d) + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 7, (a*b*(3*A + 4*C)*ArcTanh[Sin[c + d*x]])/(4*d) + ((8*a^2*A + 10*A*b^2 + 10*a^2*C + 15*b^2*C)*Tan[c + d*x])/(15*d) + (a*b*(3*A + 4*C)*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((8*a^2*A + A*b^2 + 10*a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(30*d) + (A*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(10*d) + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, (b*(24*a^2*A + 6*A*b^2 + 18*a^2*C + 5*b^2*C)*x)/16 + (a*(15*a^2*A + 30*A*b^2 + 10*a^2*C + 24*b^2*C)*Sin[c + d*x])/(15*d) + (b*(24*a^2*A + 6*A*b^2 + 18*a^2*C + 5*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (a*(90*A*b^2 + 2*a^2*C + 71*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(120*d) + ((30*A*b^2 + 6*a^2*C + 25*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(120*d) + (a*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(10*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 5, (1/8)*a*(8*a^2*A + 12*A*b^2 + 4*a^2*C + 9*b^2*C)*x + ((80*a^2*A*b^2 + 20*A*b^4 - 3*a^4*C + 52*a^2*b^2*C + 16*b^4*C)*Sin[c + d*x])/(30*b*d) + (a*(100*A*b^2 - 6*a^2*C + 71*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((20*A*b^2 - 3*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*b*d) - (a*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*b*d) + (C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, (1/8)*b*(24*a^2*A + 4*A*b^2 + 12*a^2*C + 3*b^2*C)*x + (a^3*A*ArcTanh[Sin[c + d*x]])/d + (a*(20*A*b^2 + 2*a^2*C + 13*b^2*C)*Sin[c + d*x])/(8*d) + ((4*A*b^2 + 2*a^2*C + 3*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(8*d) + (a*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(4*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, (1/2)*a*(6*A*b^2 + 2*a^2*C + 3*b^2*C)*x + (3*a^2*A*b*ArcTanh[Sin[c + d*x]])/d - (b*(6*a^2*A - 6*A*b^2 - 11*a^2*C - 4*b^2*C)*Sin[c + d*x])/(6*d) - (a*b*(6*A - 5*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) - (b*(3*A - C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^3*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, (1/2)*b*(2*A*b^2 + 6*a^2*C + b^2*C)*x + (a*(a^2*A + 6*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (5*a*b^2*(A - C)*Sin[c + d*x])/(2*d) - (b^2*(4*A - C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (3*A*b*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, 3*a*b^2*C*x + (b*(3*a^2*A + 2*A*b^2 + 6*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(4*a^2*A + 11*A*b^2 + 6*a^2*C - 6*b^2*C)*Sin[c + d*x])/(6*d) + ((2*a^2*A + 3*A*b^2 + 3*a^2*C)*(a + b*Cos[c + d*x])*Tan[c + d*x])/(3*d) + (A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 6, b^3*C*x + (a*(3*a^2*A + 12*A*b^2 + 4*a^2*C + 24*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (b*(13*a^2*A + 2*A*b^2 + 20*a^2*C)*Tan[c + d*x])/(8*d) + ((3*a^2*A + 2*A*b^2 + 4*a^2*C)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(8*d) + (A*b*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(4*d) + (A*(b + a*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 7, (b*(9*a^2*A + 4*A*b^2 + 12*a^2*C + 8*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*(8*a^2*A + 30*A*b^2 + 10*a^2*C + 45*b^2*C)*Tan[c + d*x])/(15*d) + (b*(103*a^2*A + 6*A*b^2 + 140*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((8*a^2*A + 3*A*b^2 + 10*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(30*d) + (3*A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 8, (a*(5*a^2*A + 18*A*b^2 + 6*a^2*C + 24*b^2*C)*ArcTanh[Sin[c + d*x]])/(16*d) + (b*(24*a^2*A + 10*A*b^2 + 30*a^2*C + 15*b^2*C)*Tan[c + d*x])/(15*d) + (a*(5*a^2*A + 18*A*b^2 + 6*a^2*C + 24*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (b*(71*a^2*A + 2*A*b^2 + 90*a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + ((25*a^2*A + 6*A*b^2 + 30*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + (A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(10*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}


{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, (a*b*(8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*x)/4 + ((105*a^4*A + 420*a^2*A*b^2 + 56*A*b^4 + 70*a^4*C + 336*a^2*b^2*C + 48*b^4*C)*Sin[c + d*x])/(105*d) + (a*b*(8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((252*a^2*A*b^2 + 56*A*b^4 + 2*a^4*C + 197*a^2*b^2*C + 48*b^4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(210*d) + (a*(126*A*b^2 + 6*a^2*C + 103*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(210*d) + ((7*A*b^2 + 2*a^2*C + 6*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(35*d) + (2*a*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(21*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 6, (1/16)*(16*a^4*A + 48*a^2*A*b^2 + 6*A*b^4 + 8*a^4*C + 36*a^2*b^2*C + 5*b^4*C)*x + (a*(190*a^2*A*b^2 + 160*A*b^4 - 4*a^4*C + 121*a^2*b^2*C + 128*b^4*C)*Sin[c + d*x])/(60*b*d) + ((260*a^2*A*b^2 + 90*A*b^4 - 8*a^4*C + 178*a^2*b^2*C + 75*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(240*d) + (a*(70*A*b^2 - 4*a^2*C + 53*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(120*b*d) + ((30*A*b^2 - 4*a^2*C + 25*b^2*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(120*b*d) - (a*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(30*b*d) + (C*(a + b*Cos[c + d*x])^5*Sin[c + d*x])/(6*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, (1/2)*a*b*(8*a^2*A + 4*A*b^2 + 4*a^2*C + 3*b^2*C)*x + (a^4*A*ArcTanh[Sin[c + d*x]])/d + ((130*a^2*A*b^2 + 20*A*b^4 + 6*a^4*C + 83*a^2*b^2*C + 16*b^4*C)*Sin[c + d*x])/(30*d) + (a*(40*A*b^2 + 6*a^2*C + 29*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(30*d) + ((5*A*b^2 + 3*a^2*C + 4*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(15*d) + (a*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(5*d) + (C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, (1/8)*(48*a^2*A*b^2 + 4*A*b^4 + 8*a^4*C + 24*a^2*b^2*C + 3*b^4*C)*x + (4*a^3*A*b*ArcTanh[Sin[c + d*x]])/d - (a*b*(24*a^2*A - 84*A*b^2 - 50*a^2*C - 55*b^2*C)*Sin[c + d*x])/(24*d) - (b*(24*a^2*A - 12*A*b^2 - 26*a^2*C - 9*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(24*d) - (a*b*(12*A - 7*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) - (b*(4*A - C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^4*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, 2*a*b*(2*A*b^2 + 2*a^2*C + b^2*C)*x + (a^2*(a^2*A + 12*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b^2*(21*a^2*A - 6*A*b^2 - 26*a^2*C - 4*b^2*C)*Sin[c + d*x])/(6*d) - (a*b^2*(9*A - 4*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d) - (b^2*(15*A - 2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(6*d) + (2*A*b*(a + b*Cos[c + d*x])^3*Tan[c + d*x])/d + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, (1/2)*b^2*(2*A*b^2 + 12*a^2*C + b^2*C)*x + (2*a*b*(a^2*A + 2*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/d - (a*b*(4*a^2*A + 26*A*b^2 + 6*a^2*C - 21*b^2*C)*Sin[c + d*x])/(6*d) - (b*(4*a^2*A + 18*A*b^2 + 6*a^2*C - 3*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + ((2*a^2*A + 6*A*b^2 + 3*a^2*C)*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/(3*d) + (2*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]*Tan[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, 4*a*b^3*C*x + ((3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 4*a^4*C + 48*a^2*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) - (b^2*(55*a^2*A + 50*A*b^2 + 84*a^2*C - 24*b^2*C)*Sin[c + d*x])/(24*d) + (b*(23*a^2*A + 12*A*b^2 + 36*a^2*C)*(a + b*Cos[c + d*x])*Tan[c + d*x])/(12*d) + ((3*a^2*A + 4*A*b^2 + 4*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 7, b^4*C*x + (a*b*(3*a^2*A + 4*A*b^2 + 4*a^2*C + 8*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((16*a^4*A + 83*a^2*A*b^2 + 6*A*b^4 + 20*a^4*C + 130*a^2*b^2*C)*Tan[c + d*x])/(30*d) + (b*(29*a^2*A + 6*A*b^2 + 40*a^2*C)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(30*d) + ((4*a^2*A + 3*A*b^2 + 5*a^2*C)*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(15*d) + (A*b*(b + a*Sec[c + d*x])^3*Tan[c + d*x])/(5*d) + (A*(b + a*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 8, ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 6*a^4*C + 48*a^2*b^2*C + 16*b^4*C)*ArcTanh[Sin[c + d*x]])/(16*d) + (4*a*b*(8*a^2*A + 10*A*b^2 + 10*a^2*C + 15*b^2*C)*Tan[c + d*x])/(15*d) + ((75*a^4*A + 334*a^2*A*b^2 + 8*A*b^4 + 90*a^4*C + 460*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(240*d) + (b*(39*a^2*A + 4*A*b^2 + 50*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + ((25*a^2*A + 12*A*b^2 + 30*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + (2*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^4*Tan[c + d*x])/(15*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^8*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 9, (a*b*(5*a^2*A + 6*A*b^2 + 6*a^2*C + 8*b^2*C)*ArcTanh[Sin[c + d*x]])/(4*d) + ((48*a^4*A + 336*a^2*A*b^2 + 70*A*b^4 + 56*a^4*C + 420*a^2*b^2*C + 105*b^4*C)*Tan[c + d*x])/(105*d) + (a*b*(5*a^2*A + 6*A*b^2 + 6*a^2*C + 8*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((48*a^4*A + 197*a^2*A*b^2 + 2*A*b^4 + 56*a^4*C + 252*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(210*d) + (b*(103*a^2*A + 6*A*b^2 + 126*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(210*d) + ((6*a^2*A + 2*A*b^2 + 7*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(35*d) + (2*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^5*Tan[c + d*x])/(21*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^6*Tan[c + d*x])/(7*d)}


{(a^2 - b^2*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*a*(8*a^4 + 8*a^2*b^2 - 9*b^4)*x + (b*(83*a^4 - 32*a^2*b^2 - 16*b^4)*Sin[c + d*x])/(30*d) + (a*b^2*(106*a^2 - 71*b^2)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + (b*(23*a^2 - 16*b^2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*d) + (a*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*d) - (b*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{(a^2 - b^2*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(8*a^4 - 3*b^4)*x + (a*b*(13*a^2 - 8*b^2)*Sin[c + d*x])/(6*d) + (b^2*(14*a^2 - 9*b^2)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (a*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) - (b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{(a^2 - b^2*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 3, (1/2)*a*(2*a^2 - b^2)*x + (2*b*(2*a^2 - b^2)*Sin[c + d*x])/(3*d) + (a*b^2*Cos[c + d*x]*Sin[c + d*x])/(6*d) - (b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, ((8*a^2*A*b^2 + 4*A*b^4 + 8*a^4*C + 4*a^2*b^2*C + 3*b^4*C)*x)/(8*b^5) - (2*a^3*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^5*Sqrt[a^2 - b^2]*d) - (a*(3*A*b^2 + 3*a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b^4*d) + ((4*A*b^2 + 4*a^2*C + 3*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*b^3*d) - (a*C*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*d) + (C*Cos[c + d*x]^3*Sin[c + d*x])/(4*b*d)}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, -(a*(2*A*b^2 + 2*a^2*C + b^2*C)*x)/(2*b^4) + (2*a^2*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*A*b^2 + 3*a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b^3*d) - (a*C*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) + (C*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, ((2*A*b^2 + 2*a^2*C + b^2*C)*x)/(2*b^3) - (2*a*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) - (a*C*Sin[c + d*x])/(b^2*d) + (C*Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 3, -((a*C*x)/b^2) + (2*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (C*x)/b - (2*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*b*Sqrt[a^2 - b^2]*d) + (A*ArcTanh[Sin[c + d*x]])/(a*d)}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (2*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - (A*b*ArcTanh[Sin[c + d*x]])/(a^2*d) + (A*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, -((2*b*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d)) + ((a^2*A + 2*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - (A*b*Tan[c + d*x])/(a^2*d) + (A*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*b^2*(A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) - (b*(a^2*A + 2*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) + ((2*a^2*A + 3*A*b^2 + 3*a^2*C)*Tan[c + d*x])/(3*a^3*d) - (A*b*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) + (A*Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, -((a*(2*A*b^2 + 4*a^2*C + b^2*C)*x)/b^5) + (2*a^2*(2*a^2*A*b^2 - 3*A*b^4 + 4*a^4*C - 5*a^2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(3/2)*d) + ((6*a^2*A*b^2 - 3*A*b^4 + 12*a^4*C - 7*a^2*b^2*C - 2*b^4*C)*Sin[c + d*x])/(3*b^4*(a^2 - b^2)*d) - (a*(A*b^2 + 2*a^2*C - b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((3*A*b^2 + 4*a^2*C - b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, ((2*A*b^2 + 6*a^2*C + b^2*C)*x)/(2*b^4) - (2*a*(a^2*A*b^2 - 2*A*b^4 + 3*a^4*C - 4*a^2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - (a*(A*b^2 + 3*a^2*C - 2*b^2*C)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 + 3*a^2*C - b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 4, (-2*a*C*x)/b^3 - (2*(A*b^4 - 2*a^4*C + 3*a^2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((A*b^2 + 2*a^2*C - b^2*C)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, (C*x)/b^2 + (2*a*(A*b^2 - a^2*C + 2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 4, -((2*b*(2*a^2*A - A*b^2 + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^2*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, (2*(3*a^2*A*b^2 - 2*A*b^4 + a^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) - (2*A*b*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2*A - 2*A*b^2 - a^2*C)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, -((2*b*(4*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C - a^2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d)) + ((a^2*A + 6*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) - (b*(2*a^2*A - 3*A*b^2 - a^2*C)*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 - 2*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^4*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 7, (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C - 2*a^2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) - (b*(a^2*A + 4*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 + 3*a^4*C - 6*a^2*b^2*C)*Tan[c + d*x])/(3*a^4*(a^2 - b^2)*d) - (b*(a^2*A - 2*A*b^2 - a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 - 3*a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, ((2*A*b^2 + 12*a^2*C + b^2*C)*x)/(2*b^5) - (a*(2*a^4*A*b^2 - 5*a^2*A*b^4 + 6*A*b^6 + 12*a^6*C - 29*a^4*b^2*C + 20*a^2*b^4*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) - (a*(2*a^2*A*b^2 - 5*A*b^4 + 12*a^4*C - 21*a^2*b^2*C + 6*b^4*C)*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) + ((a^2*A*b^2 - 4*A*b^4 + 6*a^4*C - 10*a^2*b^2*C + b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((3*A*b^4 - 4*a^4*C + 7*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 5, (-3*a*C*x)/b^4 + ((a^2*A*b^4 + 2*A*b^6 + 6*a^6*C - 15*a^4*b^2*C + 12*a^2*b^4*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b^4 - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b^2 + 2*A*b^4 - 3*a^4*C + 6*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, (C*x)/b^3 - (a*(3*A*b^4 + 2*a^4*C - 5*a^2*b^2*C + 6*b^4*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((2*a^2*A*b^2 + A*b^4 - 2*a^4*C + 5*a^2*b^2*C)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, ((2*a^2*A + A*b^2 + a^2*C + 2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a*(3*A*b^2 - a^2*C + 4*b^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 5, -((b*(6*a^4*A - 5*a^2*A*b^2 + 2*A*b^4 + 3*a^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((5*a^2*A*b^2 - 2*A*b^4 + a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, ((12*a^4*A*b^2 - 15*a^2*A*b^4 + 6*A*b^6 + 2*a^6*C + a^4*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) - (3*A*b*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 - 3*a^4*C)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((6*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C + a^2*b^2*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, -((b*(20*a^4*A*b^2 - 29*a^2*A*b^4 + 12*A*b^6 + 6*a^6*C - 5*a^4*b^2*C + 2*a^2*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d)) + ((a^2*A + 12*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^5*d) - (b*(6*a^4*A - 21*a^2*A*b^2 + 12*A*b^4 - 5*a^4*C + 2*a^2*b^2*C)*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 - 4*a^4*C + a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((7*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^4*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 7, ((2*A*b^2 + 20*a^2*C + b^2*C)*x)/(2*b^6) - (a*(2*a^6*A*b^2 - 7*a^4*A*b^4 + 8*a^2*A*b^6 - 8*A*b^8 + 20*a^8*C - 69*a^6*b^2*C + 84*a^4*b^4*C - 40*a^2*b^6*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^6*(a^2 - b^2)^(7/2)*d) - (a*(6*a^4*A*b^2 - 17*a^2*A*b^4 + 26*A*b^6 + 60*a^6*C - 167*a^4*b^2*C + 146*a^2*b^4*C - 24*b^6*C)*Sin[c + d*x])/(6*b^5*(a^2 - b^2)^3*d) + ((a^4*A*b^2 - 2*a^2*A*b^4 + 6*A*b^6 + 10*a^6*C - 27*a^4*b^2*C + 23*a^2*b^4*C - b^6*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^3*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^4*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((a^2*A*b^2 + 4*A*b^4 - 5*a^4*C + 10*a^2*b^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((2*a^4*A*b^2 + a^2*A*b^4 + 12*A*b^6 + 20*a^6*C - 53*a^4*b^2*C + 48*a^2*b^4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 6, (-4*a*C*x)/b^5 - ((3*a^2*A*b^6 + 2*A*b^8 - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + 20*a^2*b^6*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((4*a^2*A*b^4 + 11*A*b^6 + 24*a^6*C - 68*a^4*b^2*C + 65*a^2*b^4*C - 6*b^6*C)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((2*a^2*A*b^2 + 3*A*b^4 - 4*a^4*C + 9*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((3*a^2*A*b^4 + 2*A*b^6 + 4*a^6*C - 11*a^4*b^2*C + 12*a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, (C*x)/b^4 + (a*(a^2*A*b^4 + 4*A*b^6 - 2*a^6*C + 7*a^4*b^2*C - 8*a^2*b^4*C + 8*b^6*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((3*a^2*A*b^2 + 2*A*b^4 - 3*a^4*C + 8*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((13*a^2*A*b^4 + 2*A*b^6 + 6*a^6*C - 17*a^4*b^2*C + 26*a^2*b^4*C)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, -((b*(4*a^2*A + A*b^2 + 3*a^2*C + 2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((4*a^2*A*b^2 + A*b^4 - 2*a^4*C + 7*a^2*b^2*C)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + (a*(2*a^2*A*b^2 + 13*A*b^4 + 2*a^4*C - 5*a^2*b^2*C + 18*b^4*C)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, (a*(2*a^2*A + 3*A*b^2 + a^2*C + 4*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (a*(5*A*b^2 - a^2*C + 6*b^2*C)*Sin[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((11*a^2*A*b^2 + 4*A*b^4 - a^4*C + 10*a^2*b^2*C + 6*b^4*C)*Sin[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 6, -((b*(8*a^6*A - 8*a^4*A*b^2 + 7*a^2*A*b^4 - 2*A*b^6 + 4*a^6*C + a^4*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((8*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((26*a^4*A*b^2 - 17*a^2*A*b^4 + 6*A*b^6 + 2*a^6*C + 13*a^4*b^2*C)*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 7, ((20*a^6*A*b^2 - 35*a^4*A*b^4 + 28*a^2*A*b^6 - 8*A*b^8 + 2*a^8*C + 3*a^6*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) - (4*A*b*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 - 11*a^6*C - 4*a^4*b^2*C)*Tan[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((9*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C + 2*a^2*b^2*C)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((12*a^4*A*b^2 - 11*a^2*A*b^4 + 4*A*b^6 + 2*a^6*C + 3*a^4*b^2*C)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 8, -((b*(40*a^6*A*b^2 - 84*a^4*A*b^4 + 69*a^2*A*b^6 - 20*A*b^8 + 8*a^8*C - 8*a^6*b^2*C + 7*a^4*b^4*C - 2*a^2*b^6*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d)) + ((a^2*A + 20*A*b^2 + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^6*d) - (b*(24*a^6*A - 146*a^4*A*b^2 + 167*a^2*A*b^4 - 60*A*b^6 - 26*a^6*C + 17*a^4*b^2*C - 6*a^2*b^4*C)*Tan[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 - 6*a^6*C + 2*a^4*b^2*C - a^2*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((10*a^2*A*b^2 - 5*A*b^4 + 4*a^4*C + a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((48*a^4*A*b^2 - 53*a^2*A*b^4 + 20*A*b^6 + 12*a^6*C + a^4*b^2*C + 2*a^2*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}


{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 2, a*x - (b*Sin[c + d*x])/d}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, -x + (4*a*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, (2*(a^2 + b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) - (2*a*b*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, (2*a*(a^2 + 2*b^2)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - (a*b*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (b*(2*a^2 + b^2)*Sin[c + d*x])/((a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 9, (-2*(a + b)*(42*a^2*A*b^2 - 189*A*b^4 + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*(21*a^2*A*b^2 - 21*A*b^4 + 8*a^4*C + 10*a^2*b^2*C - 18*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(21*A*b^2 + 8*a^2*C + 13*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^3*d) + (2*(63*A*b^2 - 6*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*a*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*b*d) + (2*C*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^1*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 8, (2*a*(a + b)*(35*A*b^2 + 8*a^2*C + 19*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(35*a^2*A*b^2 - 35*A*b^4 + 8*a^4*C + 17*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 - 4*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^2*d) + (2*a*C*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b*d) + (2*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 7, (2*(a + b)*(15*A*b^2 - 2*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*(a^2 - b^2)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 9, (2*a*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 - a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 9, -(((a + b)*(A - 2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + (a*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 10, -((A*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]])) + (b*(3*A + 8*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A - A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + (A*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 11, -(((a + b)*(16*a^2*A - 3*A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + ((16*a^2*A - A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(4*a^2*A + A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A - 3*A*b^2 + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a^2*d) + (A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 10, (-4*a*(a + b)*(33*a^2*A*b^2 - 451*A*b^4 + 8*a^4*C + 18*a^2*b^2*C - 348*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(1155*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(66*a^4*A*b^2 - 341*a^2*A*b^4 + 275*A*b^6 + 16*a^6*C + 32*a^4*b^2*C - 273*a^2*b^4*C + 225*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(1155*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(33*a^2*A*b^2 + 275*A*b^4 + 8*a^4*C + 19*a^2*b^2*C + 225*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(1155*b^3*d) + (4*a*(132*A*b^2 - 3*a^2*C + 101*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(1155*b^2*d) + (2*(33*A*b^2 + a^2*C + 27*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(231*b*d) + (2*a*C*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(33*d) + (2*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 9, (2*(a + b)*(63*a^2*A*b^2 + 189*A*b^4 + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(63*a^2*A*b^2 - 63*A*b^4 + 8*a^4*C + 31*a^2*b^2*C - 39*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*(63*A*b^2 - 2*a^2*C + 44*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(63*A*b^2 + 3*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*a*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 8, (4*a*(a + b)*(70*A*b^2 - 3*a^2*C + 41*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(35*a^2*A*b^2 - 35*A*b^4 - 6*a^4*C + 31*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 - 6*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b*d) - (4*a*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*b*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 10, (2*(a + b)*(5*A*b^2 + a^2*C + 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(5*A*b^2 - a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(5*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 10, -((a*(a + b)*(3*A - 8*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*a^2*A + 6*A*b^2 - 2*a^2*C + 2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (3*a*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*(3*A - 2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 10, -((b*(a + b)*(5*A - 8*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + (a*b*(7*A + 8*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (3*A*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 11, -(((a + b)*(16*a^2*A + 3*A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((16*a^2*A + 17*A*b^2 + 24*a^2*C + 48*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(12*a^2*A - A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 3*A*b^2 + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a*d) + (A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 12, -((b*(a + b)*(52*a^2*A - 3*A*b^2 + 80*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(64*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (b*(76*a^2*A - A*b^2 + 112*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(64*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 64*a^4*C + 48*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(52*a^2*A - 3*A*b^2 + 80*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(64*a^2*d) + ((12*a^2*A + A*b^2 + 16*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(32*a*d) + (A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(8*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 11, (-2*(a + b)*(1430*a^4*A*b^2 - 39897*a^2*A*b^4 - 21021*A*b^6 + 240*a^6*C + 760*a^4*b^2*C - 30669*a^2*b^4*C - 17787*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(45045*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*(715*a^4*A*b^2 - 8866*a^2*A*b^4 + 8151*A*b^6 + 120*a^6*C + 350*a^4*b^2*C - 6992*a^2*b^4*C + 6522*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(45045*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(715*a^2*A*b^2 + 23309*A*b^4 + 120*a^4*C + 395*a^2*b^2*C + 18973*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*b^3*d) + (2*(10725*a^2*A*b^2 + 7007*A*b^4 - 90*a^4*C + 8145*a^2*b^2*C + 5929*b^4*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*b^2*d) + (2*a*(2717*A*b^2 + 15*a^2*C + 2209*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9009*b*d) + (2*(143*A*b^2 + 15*a^2*C + 121*b^2*C)*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(1287*d) + (10*a*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(143*d) + (2*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(13*d)}
{Cos[c + d*x]^1*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 10, (2*a*(a + b)*(99*a^2*A*b^2 + 957*A*b^4 + 8*a^4*C + 51*a^2*b^2*C + 741*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(693*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(99*a^4*A*b^2 + 66*a^2*A*b^4 - 165*A*b^6 + 8*a^6*C + 49*a^4*b^2*C + 78*a^2*b^4*C - 135*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(693*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(297*a^2*A*b^2 + 165*A*b^4 - 4*a^4*C + 205*a^2*b^2*C + 135*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*b^2*d) + (2*a*(297*A*b^2 + 3*a^2*C + 229*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*b*d) + (2*(33*A*b^2 + 5*a^2*C + 27*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (10*a*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^0*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 9, (2*(a + b)*(483*a^2*A*b^2 + 189*A*b^4 - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(84*a^2*A*b^2 - 84*A*b^4 - 5*a^4*C + 62*a^2*b^2*C - 57*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*(84*A*b^2 - 5*a^2*C + 57*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(63*A*b^2 - 10*a^2*C + 49*b^2*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(315*b*d) - (4*a*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(63*b*d) + (2*C*(a + b*Cos[c + d*x])^(7/2)*Sin[c + d*x])/(9*b*d)}
{Sec[c + d*x]^1*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 11, (2*a*(a + b)*(49*A*b^2 + 3*a^2*C + 29*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(21*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(14*a^2*A*b^2 + 7*A*b^4 - 3*a^4*C - 2*a^2*b^2*C + 5*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(21*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^3*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(7*A*b^2 + 3*a^2*C + 5*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 11, -(((a + b)*(15*a^2*A - 30*A*b^2 - 46*a^2*C - 18*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (a*(15*a^2*A + 60*A*b^2 - 16*a^2*C + 16*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (5*a^2*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (a*b*(15*A - 16*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (b*(5*A - 2*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 11, -((a*b*(a + b)*(27*A - 56*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(12*d*Sqrt[a + b*Cos[c + d*x]])) + (b*(33*a^2*A + 24*A*b^2 + 16*a^2*C + 8*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (b^2*(21*A - 8*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d) + (5*A*b*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 11, -(((a + b)*(16*a^2*A + 33*A*b^2 + 24*a^2*C - 48*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + (a*(16*a^2*A + 59*A*b^2 + 24*a^2*C + 96*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + (5*b*(4*a^2*A + A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 15*A*b^2 + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*d) + (5*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(12*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 12, -((b*(a + b)*(284*a^2*A + 15*A*b^2 + 432*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a*d*Sqrt[a + b*Cos[c + d*x]])) + (b*(356*a^2*A + 133*A*b^2 + 528*a^2*C + 384*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 64*a^4*C + 240*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(284*a^2*A + 15*A*b^2 + 432*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(192*a*d) + ((12*a^2*A + 5*A*b^2 + 16*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(32*d) + (5*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(24*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{(a^2 - b^2*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (4*a*(a + b)*(73*a^2 - 41*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(41*a^4 - 66*a^2*b^2 + 25*b^4)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(41*a^2 - 25*b^2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (4*a*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) - (2*b*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{(a^2 - b^2*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(17*a^2 - 9*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*a*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 9, (2*(a + b)*(168*a^2*A*b^2 + 189*A*b^4 + 128*a^4*C + 108*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(315*b^5*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(168*a^2*A*b^2 + 147*A*b^4 + 128*a^4*C + 76*a^2*b^2*C + 111*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(315*b^5*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(42*A*b^2 + 32*a^2*C + 31*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^4*d) + (2*(63*A*b^2 + 48*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^3*d) - (16*a*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*b^2*d) + (2*C*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*b*d)}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 8, (-4*a*(a + b)*(35*A*b^2 + 24*a^2*C + 22*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(70*a^2*A*b^2 + 35*A*b^4 + 48*a^4*C + 32*a^2*b^2*C + 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 + 24*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^3*d) - (12*a*C*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b^2*d) + (2*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 7, (2*(a + b)*(15*A*b^2 + 8*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(15*A*b^2 + 8*a^2*C + 7*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (8*a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^2*d) + (2*C*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 6, -((4*a*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*A*b^2 + 2*a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 8, (2*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 9, -((A*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + ((A + 2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 10, (3*A*b*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (3*A*b*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^2*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4*(A + C*Cos[c + d*x]^2)/Sqrt[a + b*Cos[c + d*x]], x, 11, -(((a + b)*(16*a^2*A + 15*A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + ((16*a^2*A + 5*A*b^2 + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*a^2*A + 5*A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 15*A*b^2 + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a^3*d) - (5*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*a^2*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 9, (-2*a*(280*a^2*A*b^2 - 175*A*b^4 + 384*a^4*C - 172*a^2*b^2*C - 107*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(105*(a - b)*b^5*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(280*a^2*A*b^2 + 35*A*b^4 + 384*a^4*C + 116*a^2*b^2*C + 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(105*b^5*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(140*a^2*A*b^2 - 35*A*b^4 + 192*a^4*C - 62*a^2*b^2*C - 25*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^4*(a^2 - b^2)*d) - (2*a*(35*A*b^2 + 48*a^2*C - 13*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b^3*(a^2 - b^2)*d) + (2*(7*A*b^2 + 8*a^2*C - b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(10*a^2*A*b^2 - 5*A*b^4 + 16*a^4*C - 8*a^2*b^2*C - 3*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(5*(a - b)*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(5*A*b^2 + 8*a^2*C + 2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(5*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(5*A*b^2 + 8*a^2*C - 3*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 + 6*a^2*C - b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, (-2*a*(3*A*b^2 + 8*a^2*C - 5*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 + 8*a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 + 4*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(A*b^2 + 2*a^2*C - b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 9, -((2*(A*b^2 + a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 10, -(((a^2*A - 3*A*b^2 - 2*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - (3*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 3*A*b^2 - 2*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 11, (b*(7*a^2*A - 15*A*b^2 - 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (5*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 15*A*b^2 + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^3*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(7*a^2*A - 15*A*b^2 - 8*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^3*(a^2 - b^2)*d) + (2*(A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 5*A*b^2 - 4*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d)}


{Cos[c + d*x]^3*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(40*a^4*A*b^2 - 75*a^2*A*b^4 + 15*A*b^6 + 128*a^6*C - 212*a^4*b^2*C + 55*a^2*b^4*C + 9*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*(a - b)^2*b^5*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*(40*a^2*A*b^2 - 45*A*b^4 + 128*a^4*C - 116*a^2*b^2*C - 17*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*b^5*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*(a^2*A*b^2 - 3*A*b^4 + 4*a^4*C - 6*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(10*a^2*A*b^2 - 20*A*b^4 + 32*a^4*C - 49*a^2*b^2*C + 7*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^4*(a^2 - b^2)^2*d) + (2*(15*a^2*A*b^2 - 35*A*b^4 + 48*a^4*C - 71*a^2*b^2*C + 3*b^4*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 8, (-4*a*(a^2*A*b^2 - 3*A*b^4 + 8*a^4*C - 14*a^2*b^2*C + 4*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*a^2*A*b^2 - 3*A*b^4 + 16*a^4*C - 16*a^2*b^2*C - b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^4*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*(2*A*b^4 - 3*a^4*C + 5*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A*b^2 - 5*A*b^4 + 8*a^4*C - 13*a^2*b^2*C + b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (-2*(a^2*A*b^2 + 3*A*b^4 - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(A*b^2 - 8*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*(a^2*A*b^2 + A*b^4 - 2*a^4*C + 4*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - 2*a^2*C + 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 10, -((2*(7*a^2*A*b^2 - 3*A*b^4 + a^4*C + 3*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A*b^2 + a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a*b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(7*a^2*A*b^2 - 3*A*b^4 + a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 11, -(((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 - 8*a^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*a^2*A - 5*A*b^2 - 2*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (5*A*b*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(9*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + a^2*b^2*C)*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 - 8*a^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}


{(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(7/2), x, 8, (2*(23*a^2*A*b^2 + 9*A*b^4 - 2*a^4*C + 19*a^2*b^2*C + 15*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^3*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*(4*A*b^2 - a^2*C + 5*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(5*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(5/2)) - (4*a*(4*A*b^2 - a^2*C + 5*b^2*C)*Sin[c + d*x])/(15*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(23*a^2*A*b^2 + 9*A*b^4 - 2*a^4*C + 19*a^2*b^2*C + 15*b^4*C)*Sin[c + d*x])/(15*b*(a^2 - b^2)^3*d*Sqrt[a + b*Cos[c + d*x]])}


{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (4*a*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2 - b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + (4*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (4*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*b*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{(a^2 - b^2*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(7/2), x, 8, (2*(5*a^2 + 3*b^2)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (4*a*b*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*b*(5*a^2 + 3*b^2)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 8, (2*a*(9*A + 7*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (10*b*(11*A + 9*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (10*b*(11*A + 9*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*a*(9*A + 7*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*b*(11*A + 9*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(77*d) + (4*a*C*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 7, (2*b*(9*A + 7*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*a*(7*A + 5*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*a*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*b*(9*A + 7*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (4*a*C*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d)}
{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2), x, 6, (2*a*(5*A + 3*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*b*(7*A + 5*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (4*a*C*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d)}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 5, (2*b*(5*A + 3*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*a*(3*A + C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (4*a*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 5, (-2*a*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*b*(3*A + C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(3*A - C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 5, (-2*b*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*a*(A + 3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (4*A*b*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*a*(3*A + 5*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*b*(A + 3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (4*A*b*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*a*(3*A + 5*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*b*(3*A + 5*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*a*(5*A + 7*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (4*A*b*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*a*(5*A + 7*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*b*(3*A + 5*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 8, (4*a*b*(9*A + 7*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (2*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (4*a*b*(9*A + 7*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(99*A*b^2 + 8*a^2*C + 81*b^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (8*a*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2), x, 7, (2*(15*a^2*A + 9*A*b^2 + 9*a^2*C + 7*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (4*a*b*(7*A + 5*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (4*a*b*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(63*A*b^2 + 8*a^2*C + 49*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (8*a*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d)}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 6, (4*a*b*(5*A + 3*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(21*a^2*A + 7*A*b^2 + 7*a^2*C + 5*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(35*A*b^2 + 8*a^2*C + 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (8*a*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 6, (-2*(5*a^2*A - 5*A*b^2 - 5*a^2*C - 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (4*a*b*(3*A + C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*a*b*(15*A - 7*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(5*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 6, (-4*a*b*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*(a^2*A + 3*A*b^2 + 3*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b^2*(5*A - C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (8*A*b*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*(3*a^2*A + 5*A*b^2 + 5*a^2*C - 5*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (4*a*b*(A + 3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (8*A*b*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-4*a*b*(3*A + 5*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 7*a^2*C + 21*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(25*a^2*A + 8*A*b^2 + 35*a^2*C)*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (4*a*b*(3*A + 5*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (8*A*b*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2), x, 8, (2*a*(5*a^2*A + 9*A*b^2 + 3*a^2*C + 7*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*b*(231*a^2*A + 55*A*b^2 + 165*a^2*C + 45*b^2*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (2*b*(231*a^2*A + 55*A*b^2 + 165*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (8*a*(132*A*b^2 + 4*a^2*C + 101*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(1155*d) + (2*(33*A*b^2 + 8*a^2*C + 27*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(231*d) + (4*a*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(33*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(11*d)}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 7, (2*b*(45*a^2*A + 9*A*b^2 + 27*a^2*C + 7*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*a*(21*a^2*A + 21*A*b^2 + 7*a^2*C + 15*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (8*a*(63*A*b^2 + 4*a^2*C + 44*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(63*A*b^2 + 24*a^2*C + 49*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d) + (4*a*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d)}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 7, (-2*a*(5*a^2*A - 15*A*b^2 - 5*a^2*C - 9*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*b*(63*a^2*A + 7*A*b^2 + 21*a^2*C + 5*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) - (2*b*(105*a^2*A - 35*A*b^2 - 57*a^2*C - 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) - (2*a*b*(35*A - 11*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) - (2*b*(7*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 7, (-2*b*(15*a^2*A - 5*A*b^2 - 15*a^2*C - 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*a*(a^2*A + 9*A*b^2 + 3*a^2*C + 3*b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (8*a*b^2*(10*A - 3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b^2*(35*A - 3*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (4*A*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 7, (-2*a*(3*a^2*A + 15*A*b^2 + 5*a^2*C - 15*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*b*(3*a^2*A + 3*A*b^2 + 9*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(9*a^2*A + 33*A*b^2 + 15*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(3*a^2*A + 8*A*b^2 + 5*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (4*A*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*b*(9*a^2*A + 5*A*b^2 + 15*a^2*C - 5*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*a*(5*a^2*A + 21*A*b^2 + 7*a^2*C + 63*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (8*b*(41*a^2*A + 12*A*b^2 + 70*a^2*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 + 35*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (12*A*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*a*(7*a^2*A + 27*A*b^2 + 9*a^2*C + 45*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*b*(15*a^2*A + 7*A*b^2 + 21*a^2*C + 21*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (8*b*(44*a^2*A + 4*A*b^2 + 63*a^2*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*a*(7*a^2*A + 27*A*b^2 + 9*a^2*C + 45*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(49*a^2*A + 24*A*b^2 + 63*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (4*A*b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2), x, 9, (2*(195*a^4*A + 702*a^2*A*b^2 + 91*A*b^4 + 117*a^4*C + 546*a^2*b^2*C + 77*b^4*C)*EllipticE[(c + d*x)/2, 2])/(195*d) + (8*a*b*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (8*a*b*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(33319*a^2*A*b^2 + 7007*A*b^4 + 384*a^4*C + 25217*a^2*b^2*C + 5929*b^4*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45045*d) + (4*a*(1573*A*b^2 + 96*a^2*C + 1259*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9009*d) + (2*(143*A*b^2 + 48*a^2*C + 121*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(1287*d) + (16*a*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(143*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(13*d)}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 8, (8*a*b*(15*a^2*A + 9*A*b^2 + 9*a^2*C + 7*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3465*d) + (4*a*(891*A*b^2 + 96*a^2*C + 673*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d) + (2*(33*A*b^2 + 16*a^2*C + 27*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d) + (16*a*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d)}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 8, (-2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (8*a*b*(21*a^2*A + 7*A*b^2 + 7*a^2*C + 5*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) - (2*a*b*(315*a^2*A - 357*A*b^2 - 187*a^2*C - 251*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) - (2*b*(315*a^2*A - 63*A*b^2 - 123*a^2*C - 49*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d) - (2*a*b*(21*A - 5*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d) - (2*b*(9*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 8, (-8*a*b*(5*a^2*A - 5*A*b^2 - 5*a^2*C - 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*EllipticF[(c + d*x)/2, 2])/(21*d) - (2*b^2*(385*a^2*A - 35*A*b^2 - 141*a^2*C - 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) - (4*a*b^2*(175*A - 27*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d) - (2*b^2*(21*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d) + (16*A*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 8, (-2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (8*a*b*(a^2*A + 3*A*b^2 + 3*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*a*b*(9*a^2*A + 73*A*b^2 + 15*a^2*C - 17*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(9*a^2*A + 59*A*b^2 + 15*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (2*(3*a^2*A + 16*A*b^2 + 5*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (16*A*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 8, (-8*a*b*(3*a^2*A + 5*A*b^2 + 5*a^2*C - 5*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*EllipticF[(c + d*x)/2, 2])/(21*d) - (2*b^2*(227*a^2*A + 279*A*b^2 + 385*a^2*C - 35*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (4*b*(101*a^2*A + 96*A*b^2 + 175*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 48*A*b^2 + 35*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (16*A*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (8*a*b*(5*a^2*A + 7*A*b^2 + 7*a^2*C + 21*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(147*a^4*A + 883*a^2*A*b^2 + 128*A*b^4 + 189*a^4*C + 1533*a^2*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (4*b*(101*a^2*A + 32*A*b^2 + 147*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*(49*a^2*A + 48*A*b^2 + 63*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (16*A*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(13/2), x, 9, (-8*a*b*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 825*a^4*C + 4653*a^2*b^2*C)*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(3/2)) + (8*a*b*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (4*b*(673*a^2*A + 96*A*b^2 + 891*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(5/2)) + (2*(27*a^2*A + 16*A*b^2 + 33*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d*Cos[c + d*x]^(7/2)) + (16*A*b*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d*Cos[c + d*x]^(9/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d*Cos[c + d*x]^(11/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(7/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x]), x, 9, (2*(15*a^2*A*b^2 + 9*A*b^4 + 15*a^4*C + 9*a^2*b^2*C + 7*b^4*C)*EllipticE[(c + d*x)/2, 2])/(15*b^5*d) - (2*a*(21*a^2*A*b^2 + 7*A*b^4 + 21*a^4*C + 7*a^2*b^2*C + 5*b^4*C)*EllipticF[(c + d*x)/2, 2])/(21*b^6*d) + (2*a^4*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(b^6*(a + b)*d) - (2*a*(7*A*b^2 + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*b^4*d) + (2*(9*A*b^2 + 9*a^2*C + 7*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*b^3*d) - (2*a*C*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*b^2*d) + (2*C*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(9*b*d)}
{(Cos[c + d*x]^(5/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x]), x, 8, (-2*a*(5*A*b^2 + 5*a^2*C + 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*b^4*d) + (2*(21*a^2*A*b^2 + 7*A*b^4 + 21*a^4*C + 7*a^2*b^2*C + 5*b^4*C)*EllipticF[(c + d*x)/2, 2])/(21*b^5*d) - (2*a^3*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(b^5*(a + b)*d) + (2*(7*A*b^2 + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*b^3*d) - (2*a*C*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*d) + (2*C*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*b*d)}
{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x]), x, 7, (2*(5*A*b^2 + 5*a^2*C + 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*b^3*d) - (2*a*(3*A*b^2 + 3*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*b^4*d) + (2*a^2*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(b^4*(a + b)*d) - (2*a*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*d) + (2*C*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b*d)}
{(Sqrt[Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x]), x, 6, (-2*a*C*EllipticE[(c + d*x)/2, 2])/(b^2*d) + (2*(3*A*b^2 + 3*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*b^3*d) - (2*a*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(b^3*(a + b)*d) + (2*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])), x, 5, (2*C*EllipticE[(c + d*x)/2, 2])/(b*d) - (2*a*C*EllipticF[(c + d*x)/2, 2])/(b^2*d) + (2*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(b^2*(a + b)*d)}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])), x, 6, (-2*A*EllipticE[(c + d*x)/2, 2])/(a*d) + (2*C*EllipticF[(c + d*x)/2, 2])/(b*d) - (2*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a*b*(a + b)*d) + (2*A*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])), x, 7, (2*A*b*EllipticE[(c + d*x)/2, 2])/(a^2*d) + (2*A*EllipticF[(c + d*x)/2, 2])/(3*a*d) + (2*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^2*(a + b)*d) + (2*A*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*A*b*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])), x, 8, (-2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*EllipticE[(c + d*x)/2, 2])/(5*a^3*d) - (2*A*b*EllipticF[(c + d*x)/2, 2])/(3*a^2*d) - (2*b*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^3*(a + b)*d) + (2*A*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*A*b*Sin[c + d*x])/(3*a^2*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sin[c + d*x])/(5*a^3*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(9/2)*(a + b*Cos[c + d*x])), x, 9, (2*b*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*EllipticE[(c + d*x)/2, 2])/(5*a^4*d) + (2*(5*a^2*A + 7*A*b^2 + 7*a^2*C)*EllipticF[(c + d*x)/2, 2])/(21*a^3*d) + (2*b^2*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^4*(a + b)*d) + (2*A*Sin[c + d*x])/(7*a*d*Cos[c + d*x]^(7/2)) - (2*A*b*Sin[c + d*x])/(5*a^2*d*Cos[c + d*x]^(5/2)) + (2*(5*a^2*A + 7*A*b^2 + 7*a^2*C)*Sin[c + d*x])/(21*a^3*d*Cos[c + d*x]^(3/2)) - (2*b*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sin[c + d*x])/(5*a^4*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(11/2)*(a + b*Cos[c + d*x])), x, 10, (-2*(7*a^4*A + 9*a^2*A*b^2 + 15*A*b^4 + 9*a^4*C + 15*a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*a^5*d) - (2*b*(5*a^2*A + 7*A*b^2 + 7*a^2*C)*EllipticF[(c + d*x)/2, 2])/(21*a^4*d) - (2*b^3*(A*b^2 + a^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^5*(a + b)*d) + (2*A*Sin[c + d*x])/(9*a*d*Cos[c + d*x]^(9/2)) - (2*A*b*Sin[c + d*x])/(7*a^2*d*Cos[c + d*x]^(7/2)) + (2*(7*a^2*A + 9*A*b^2 + 9*a^2*C)*Sin[c + d*x])/(45*a^3*d*Cos[c + d*x]^(5/2)) - (2*b*(5*a^2*A + 7*A*b^2 + 7*a^2*C)*Sin[c + d*x])/(21*a^4*d*Cos[c + d*x]^(3/2)) + (2*(7*a^4*A + 9*a^2*A*b^2 + 15*A*b^4 + 9*a^4*C + 15*a^2*b^2*C)*Sin[c + d*x])/(15*a^5*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 8, ((15*a^2*A*b^2 - 10*A*b^4 + 35*a^4*C - 24*a^2*b^2*C - 6*b^4*C)*EllipticE[(c + d*x)/2, 2])/(5*b^4*(a^2 - b^2)*d) - (a*(9*a^2*A*b^2 - 12*A*b^4 + 21*a^4*C - 20*a^2*b^2*C - 4*b^4*C)*EllipticF[(c + d*x)/2, 2])/(3*b^5*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b^2 - 5*A*b^4 + 7*a^4*C - 9*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^5*(a + b)^2*d) - (a*(3*A*b^2 + 7*a^2*C - 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)*d) + ((5*A*b^2 + 7*a^2*C - 2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 7, -((a*(A*b^2 + 5*a^2*C - 4*b^2*C)*EllipticE[(c + d*x)/2, 2])/(b^3*(a^2 - b^2)*d)) + ((3*a^2*A*b^2 - 6*A*b^4 + 15*a^4*C - 16*a^2*b^2*C - 2*b^4*C)*EllipticF[(c + d*x)/2, 2])/(3*b^4*(a^2 - b^2)*d) - (a*(a^2*A*b^2 - 3*A*b^4 + 5*a^4*C - 7*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^4*(a + b)^2*d) + ((3*A*b^2 + 5*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 6, ((A*b^2 + 3*a^2*C - 2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(b^2*(a^2 - b^2)*d) + (a*(A*b^2 - 3*a^2*C + 4*b^2*C)*EllipticF[(c + d*x)/2, 2])/(b^3*(a^2 - b^2)*d) - ((a^2*A*b^2 + A*b^4 - 3*a^4*C + 5*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^3*(a + b)^2*d) - ((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2), x, 6, -(((A*b^2 + a^2*C)*EllipticE[(c + d*x)/2, 2])/(a*b*(a^2 - b^2)*d)) - ((A*b^2 - a^2*C + 2*b^2*C)*EllipticF[(c + d*x)/2, 2])/(b^2*(a^2 - b^2)*d) + ((3*a^2*A*b^2 - A*b^4 - a^4*C + 3*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2), x, 7, -(((2*a^2*A - 3*A*b^2 - a^2*C)*EllipticE[(c + d*x)/2, 2])/(a^2*(a^2 - b^2)*d)) + ((A*b^2 + a^2*C)*EllipticF[(c + d*x)/2, 2])/(a*b*(a^2 - b^2)*d) - ((5*a^2*A*b^2 - 3*A*b^4 + a^4*C + a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^2*(a - b)*b*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 - a^2*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2), x, 8, (b*(4*a^2*A - 5*A*b^2 - a^2*C)*EllipticE[(c + d*x)/2, 2])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 - 3*a^2*C)*EllipticF[(c + d*x)/2, 2])/(3*a^2*(a^2 - b^2)*d) + ((7*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C - a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^3*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 - 3*a^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (b*(4*a^2*A - 5*A*b^2 - a^2*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^2), x, 9, -((6*a^4*A + 24*a^2*A*b^2 - 35*A*b^4 + 10*a^4*C - 15*a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*a^4*(a^2 - b^2)*d) - (b*(4*a^2*A - 7*A*b^2 - 3*a^2*C)*EllipticF[(c + d*x)/2, 2])/(3*a^3*(a^2 - b^2)*d) - (b*(9*a^2*A*b^2 - 7*A*b^4 + 5*a^4*C - 3*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2*A - 7*A*b^2 - 5*a^2*C)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)) - (b*(4*a^2*A - 7*A*b^2 - 3*a^2*C)*Sin[c + d*x])/(3*a^3*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + ((6*a^4*A + 24*a^2*A*b^2 - 35*A*b^4 + 10*a^4*C - 15*a^2*b^2*C)*Sin[c + d*x])/(5*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x]))}


{(Cos[c + d*x]^(5/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 8, -(a*(3*a^2*A*b^2 - 9*A*b^4 + 35*a^4*C - 65*a^2*b^2*C + 24*b^4*C)*EllipticE[(c + d*x)/2, 2])/(4*b^4*(a^2 - b^2)^2*d) + ((9*a^4*A*b^2 - 15*a^2*A*b^4 + 24*A*b^6 + 105*a^6*C - 223*a^4*b^2*C + 128*a^2*b^4*C + 8*b^6*C)*EllipticF[(c + d*x)/2, 2])/(12*b^5*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*(a - b)^2*b^5*(a + b)^3*d) + ((3*a^2*A*b^2 - 21*A*b^4 + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b^2 + 5*A*b^4 - 7*a^4*C + 13*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 7, -((a^2*A*b^2 + 5*A*b^4 - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*EllipticE[(c + d*x)/2, 2])/(4*b^3*(a^2 - b^2)^2*d) + (a*(a^2*A*b^2 - 7*A*b^4 - 15*a^4*C + 33*a^2*b^2*C - 24*b^4*C)*EllipticF[(c + d*x)/2, 2])/(4*b^4*(a^2 - b^2)^2*d) - ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((A*b^2 + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((3*a^2*A*b^2 + 3*A*b^4 - 5*a^4*C + 11*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 7, ((5*a^2*A*b^2 + A*b^4 - 3*a^4*C + 9*a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + 3*a^4*C - 5*a^2*b^2*C + 8*b^4*C)*EllipticF[(c + d*x)/2, 2])/(4*b^3*(a^2 - b^2)^2*d) - ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((5*a^2*A*b^2 + A*b^4 - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3), x, 7, -((9*a^2*A*b^2 - 3*A*b^4 + a^4*C + 5*a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a^2*b*(a^2 - b^2)^2*d) - ((7*a^2*A*b^2 - A*b^4 - a^4*C + 7*a^2*b^2*C)*EllipticF[(c + d*x)/2, 2])/(4*a*b^2*(a^2 - b^2)^2*d) + ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) + ((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((9*a^2*A*b^2 - 3*A*b^4 + a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3), x, 8, -((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 - 5*a^4*C - a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a^3*(a^2 - b^2)^2*d) + ((11*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + 3*a^2*b^2*C)*EllipticF[(c + d*x)/2, 2])/(4*a^2*b*(a^2 - b^2)^2*d) - ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a^3*(a - b)^2*b*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 - 5*a^4*C - a^2*b^2*C)*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^3), x, 9, (b*(24*a^4*A - 65*a^2*A*b^2 + 35*A*b^4 - 9*a^4*C + 3*a^2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 - 21*a^4*C + 3*a^2*b^2*C)*EllipticF[(c + d*x)/2, 2])/(12*a^3*(a^2 - b^2)^2*d) + ((63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 - 21*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (b*(24*a^4*A - 65*a^2*A*b^2 + 35*A*b^4 - 9*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 + 5*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2), x, 8, ((a + b)*(24*A*b^2 - 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(24*A*b - a*C + 14*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(8*A*b^2 + a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (a*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((24*A*b^2 - 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^2*d)}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 7, (a*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A - 4*A*b + a*C - 2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (a*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b*d)}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 7, -(((a + b)*(2*A - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((2*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/d}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 7, (-2*A*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A + A*b + 3*a*C - 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a*d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*(a + b)*(9*a^2*A - 2*A*b^2 + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 15*a^2*C + 15*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A - 2*A*b^2 + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*a^2*d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*b*(a + b)*(19*a^2*A + 8*A*b^2 + 35*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 35*a^3*C + 35*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A - 4*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Cos[c + d*x]^(3/2)) + (2*b*(19*a^2*A + 8*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(105*a^3*d*Sqrt[Cos[c + d*x]])}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2), x, 9, (a*(a + b)*(80*A*b^2 - 3*a^2*C + 52*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((64*a^2*A*b - 16*a*A*b^2 + 32*A*b^3 - a^3*C + 38*a^2*b*C - 12*a*b^2*C + 24*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*A*b^2 + a^2*C + 12*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*b*d) + (a*C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(8*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + (a*(80*A*b^2 - 3*a^2*C + 52*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(64*b^2*d)}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 8, ((a + b)*(24*A*b^2 + 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(24*a*A - 48*A*b + 7*a*C - 26*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(24*A*b^2 - a^2*C + 12*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((24*A*b^2 + 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b*d)}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 8, -(a*(a + b)*(8*A - 5*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 8*a*A*b - 4*A*b^2 - 4*a^2*C + a*b*C - 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 3*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - (a*(8*A - 5*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*d)}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 8, -(b*(a + b)*(8*A - 3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*C - 6*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (6*a*b*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - (b*(8*A - 3*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*d)}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 8, (-2*(a + b)*(3*a^2*A + A*b^2 + 5*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(5*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 4*a*A*b + A*b^2 + 5*a^2*C + 10*a*b*C - 5*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(5*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(3*a^2*A + A*b^2 + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(5*a*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-4*b*(a + b)*(41*a^2*A - 3*A*b^2 + 70*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 35*a^3*C + 140*a^2*b*C + 105*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (6*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 3*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (4*b*(41*a^2*A - 3*A*b^2 + 70*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(105*a^2*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 189*a^4*C + 252*a^3*b*C + 63*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2*A + 3*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(5/2)) + (4*b*(44*a^2*A - 2*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(315*a^3*d*Sqrt[Cos[c + d*x]])}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2), x, 10, ((a + b)*(2640*a^2*A*b^2 + 1280*A*b^4 - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(1920*a^2*A*b - 1040*a*A*b^2 + 3040*A*b^3 - 15*a^3*C + 1146*a^2*b*C - 772*a*b^2*C + 2312*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(80*a^2*A*b^2 + 320*A*b^4 + 3*a^4*C + 40*a^2*b^2*C + 240*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(1040*A*b^2 + 15*a^2*C + 772*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d) + ((80*A*b^2 + 15*a^2*C + 64*b^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d) + (a*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(8*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d) + ((2640*a^2*A*b^2 + 1280*A*b^4 - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(1920*b^2*d)}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 9, (a*(a + b)*(432*A*b^2 + 15*a^2*C + 284*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((192*a^3*A - 576*a^2*A*b + 48*a*A*b^2 - 96*A*b^3 + 59*a^3*C - 322*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*A*b^2 + 5*a^2*C + 12*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*d) + (5*a*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(4*d) + (a*(432*A*b^2 + 15*a^2*C + 284*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b*d)}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 9, -((a + b)*(48*a^2*A - 24*A*b^2 - 33*a^2*C - 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(24*a^2*A + 72*a*A*b - 72*A*b^2 - 24*a^2*C + 13*a*b*C - 38*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (5*a*(8*A*b^2 + a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (a*b*(8*A - 3*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) - (b*(6*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((48*a^2*A - 24*A*b^2 - 33*a^2*C - 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*d)}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 9, -(a*b*(a + b)*(56*A - 27*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^3*A + 28*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 12*a^3*C - 36*a^2*b*C + 3*a*b^2*C - 6*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(6*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(8*A*b^2 + 15*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b^2*(8*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - (a*b*(56*A - 27*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(12*d)}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 9, -((a + b)*(18*a^2*A + 46*A*b^2 + 30*a^2*C - 15*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 15*a^3*C + 45*a^2*b*C - 45*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (10*a*b^2*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) - ((18*a^2*A + 46*A*b^2 + 30*a^2*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*d)}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 9, (-2*b*(a + b)*(29*a^2*A + 3*A*b^2 + 49*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(21*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*a^3*A + 29*a^2*A*b + 27*a*A*b^2 + 3*A*b^3 + 7*a^3*C + 49*a^2*b*C + 63*a*b^2*C - 21*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(21*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*a^2*A + 3*A*b^2 + 7*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*b*(29*a^2*A + 3*A*b^2 + 49*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(21*a*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 189*a^4*C + 357*a^3*b*C + 483*a^2*b^2*C + 315*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(315*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(49*a^2*A + 15*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*b*(163*a^2*A + 5*A*b^2 + 231*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(3/2)) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(315*a^2*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(13/2), x, 9, -((2*b*(a + b)*(741*a^4*A + 51*a^2*A*b^2 + 8*A*b^4 + 957*a^4*C + 99*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(693*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(135*a^5*A + 741*a^4*A*b + 663*a^3*A*b^2 + 51*a^2*A*b^3 + 2*a*A*b^4 + 8*A*b^5 + 165*a^5*C + 957*a^4*b*C + 891*a^3*b^2*C + 99*a^2*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(693*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(27*a^2*A + 5*A*b^2 + 33*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(231*d*Cos[c + d*x]^(7/2)) + (2*b*(229*a^2*A + 3*A*b^2 + 297*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*a*d*Cos[c + d*x]^(5/2)) + (2*(135*a^4*A + 205*a^2*A*b^2 - 4*A*b^4 + 165*a^4*C + 297*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*a^2*d*Cos[c + d*x]^(3/2)) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(99*d*Cos[c + d*x]^(9/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(11*d*Cos[c + d*x]^(11/2)) + (2*b*(741*a^4*A + 51*a^2*A*b^2 + 8*A*b^4 + 957*a^4*C + 99*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(693*a^3*d*Sqrt[Cos[c + d*x]])}
(* {((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Cos[c + d*x]^(15/2), x, 10, -((2*(a + b)*(17787*a^6*A + 30669*a^4*A*b^2 - 760*a^2*A*b^4 - 240*A*b^6 + 21021*a^6*C + 39897*a^4*b^2*C - 1430*a^2*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(45045*a^4*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(45045*a^3*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(17787*a^6*A + 30831*a^5*A*b + 30669*a^4*A*b^2 + 16685*a^3*A*b^3 - 760*a^2*A*b^4 - 60*a*A*b^5 - 240*A*b^6 + 21021*a^6*C + 37323*a^5*b*C + 39897*a^4*b^2*C + 22165*a^3*b^3*C - 1430*a^2*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (2*(121*a^2*A + 15*A*b^2 + 143*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(1287*d*Cos[c + d*x]^(9/2)) + (2*b*(2209*a^2*A + 15*A*b^2 + 2717*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9009*a*d*Cos[c + d*x]^(7/2)) + (2*(5929*a^4*A + 8145*a^2*A*b^2 - 90*A*b^4 + 7007*a^4*C + 10725*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*a^2*d*Cos[c + d*x]^(5/2)) + (2*b*(18973*a^4*A + 395*a^2*A*b^2 + 120*A*b^4 + 23309*a^4*C + 715*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*a^3*d*Cos[c + d*x]^(3/2)) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(143*d*Cos[c + d*x]^(11/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(13*d*Cos[c + d*x]^(13/2)) + (2*(17787*a^6*A + 30669*a^4*A*b^2 - 760*a^2*A*b^4 - 240*A*b^6 + 21021*a^6*C + 39897*a^4*b^2*C - 1430*a^2*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(45045*a^4*d*Sqrt[Cos[c + d*x]])} *)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]], x, 8, ((a + b)*(24*A*b^2 + 15*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(5*a + 2*b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(8*A*b^2 + 5*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (5*a*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b^2*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d) + ((24*A*b^2 + 15*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^3*d)}
{(Sqrt[Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]], x, 7, (-3*a*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*A*b - a*C + 2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 3*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d) - (3*a*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^2*d)}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]), x, 6, ((a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b*d)}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]), x, 6, (-2*A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(a*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]), x, 5, (4*A*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (4*A*b*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^2*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*Sqrt[a + b*Cos[c + d*x]]), x, 6, (-2*(a + b)*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (8*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*a^3*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(9/2)*Sqrt[a + b*Cos[c + d*x]]), x, 7, (4*b*(a + b)*(22*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A - 44*a^2*A*b - 12*a*A*b^2 - 48*A*b^3 + 35*a^3*C - 70*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*a*d*Cos[c + d*x]^(7/2)) - (12*A*b*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a^2*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^3*d*Cos[c + d*x]^(3/2)) - (4*b*(22*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(105*a^4*d*Sqrt[Cos[c + d*x]])}

{(Sqrt[Cos[c + d*x]]*(a*A + (A*b + a*B)*Cos[c + d*x] + b*B*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]], x, 7, ((a + b)*(4*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A - a*B + 2*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b*d)}
{(a + a*Cos[c + d*x] + 2*b*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]), x, 2, (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/d}


{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2), x, 8, -(a*(8*A*b^2 + 15*a^2*C - 7*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*A*b^2 + 5*a^2*C - 3*a*b*C + 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*(a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 15*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*A*b^2 + 5*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) - (a*(8*A*b^2 + 15*a^2*C - 7*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^3*(a^2 - b^2)*d)}
{(Sqrt[Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2), x, 7, ((2*A*b^2 + 3*a^2*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (6*a*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((2*A*b^2 + 3*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d)}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)), x, 6, (-2*(A*b^2 + a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Tan[(c + d*x)/2])/(a*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)), x, 5, (-2*(a^2*A - 2*A*b^2 - a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 - a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(3/2)), x, 6, (2*b*(5*a^2*A - 8*A*b^2 - 3*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (2*b*(5*a^2*A - 8*A*b^2 - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^(3/2)), x, 7, (-2*(3*a^4*A + 8*a^2*A*b^2 - 16*A*b^4 + 5*a^4*C - 10*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(5*a^4*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^3*A - 4*a^2*A*b + 12*a*A*b^2 - 16*A*b^3 + 5*a^3*C - 10*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(5*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*A*b^2 - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)) - (2*b*(3*a^2*A - 8*A*b^2 - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a^3*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + (2*(3*a^4*A + 8*a^2*A*b^2 - 16*A*b^4 + 5*a^4*C - 10*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(5*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(3/2)*(A + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(5/2), x, 8, -((8*A*b^4 - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A*b^2 + 3*A*b^3 - 5*a^3*C + 3*a^2*b*C + 6*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (10*a*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 - 5*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*A*b^4 - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^(1/2)*(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(3*a^2*A*b^2 + A*b^4 - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b + A*b^2 - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(3*a^2*A*b^2 + A*b^4 - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)), x, 5, (-4*b*(3*a^2*A - A*b^2 + 2*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 + a^2*C + 3*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*b*(3*a^2*A - A*b^2 + 2*a^2*C)*Sqrt[Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2)), x, 6, (-2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C - a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 - 3*a^3*C - a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)) + (4*(4*a^2*A*b^2 - 2*A*b^4 + a^4*C + a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C - a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(5/2)), x, 7, (4*b*(4*a^4*A - 14*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C + a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 9*a^3*A*b + 16*a^2*A*b^2 + 12*a*A*b^3 - 16*A*b^4 + 3*a^4*C + 3*a^3*b*C - 2*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)) + (4*(5*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 - 5*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (4*b*(4*a^4*A - 14*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/3)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(A + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x, 2, Int[(A + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x]}
{(A + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x, 2, Int[(A + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x]}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x, 1, Int[(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x]}
{(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x, 1, Int[(A + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*b*(3*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*a*(5*A + 7*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*b*(3*A + 5*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*a*(5*A + 7*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (4*A*b*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*a*(3*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*b*(A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*(3*A + 5*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (4*A*b*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 6, -((2*b*(A - C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*a*(A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (4*A*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 6, -((2*a*(A - C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*b*(3*A + C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(3*A - C)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 6, (2*b*(5*A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*a*(3*A + C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (4*a*C*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 7, (2*a*(5*A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*b*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (4*a*C*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(3/2)) + (2*b*(7*A + 5*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 8, (2*b*(9*A + 7*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*a*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (4*a*C*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(5/2)) + (2*b*(9*A + 7*C)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*a*(7*A + 5*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (4*a*b*(5*A + 7*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (4*a*b*(5*A + 7*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(49*a^2*A + 8*A*b^2 + 63*a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (8*A*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((4*a*b*(3*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^2*A + 7*A*b^2 + 7*a^2*C + 21*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (4*a*b*(3*A + 5*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(25*a^2*A + 8*A*b^2 + 35*a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (8*A*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a^2*A + 5*A*b^2 + 5*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (4*a*b*(A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (8*A*b*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 7, -((4*a*b*(A - C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*(a^2*A + 3*A*b^2 + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b^2*(5*A - C)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (8*A*b*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 7, -((2*(5*a^2*A - 5*A*b^2 - 5*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (4*a*b*(3*A + C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*a*b*(15*A - 7*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(5*A - C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 7, (4*a*b*(5*A + 3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(21*a^2*A + 7*A*b^2 + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(35*A*b^2 + 8*a^2*C + 25*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (8*a*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 8, (2*(15*a^2*A + 9*A*b^2 + 9*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (4*a*b*(7*A + 5*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(63*A*b^2 + 8*a^2*C + 49*b^2*C)*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (8*a*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(3/2)) + (4*a*b*(7*A + 5*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 9, (4*a*b*(9*A + 7*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(99*A*b^2 + 8*a^2*C + 81*b^2*C)*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (8*a*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d*Sec[c + d*x]^(5/2)) + (4*a*b*(9*A + 7*C)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*a*(7*a^2*A + 27*A*b^2 + 9*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*b*(15*a^2*A + 7*A*b^2 + 21*a^2*C + 21*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(7*a^2*A + 27*A*b^2 + 9*a^2*C + 45*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (8*b*(44*a^2*A + 4*A*b^2 + 63*a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 24*A*b^2 + 63*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (4*A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(21*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*b*(9*a^2*A + 5*A*b^2 + 15*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*a*(5*a^2*A + 21*A*b^2 + 7*a^2*C + 63*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (8*b*(41*a^2*A + 12*A*b^2 + 70*a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 24*A*b^2 + 35*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (12*A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 8, -((2*a*(3*a^2*A + 15*A*b^2 + 5*a^2*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*b*(3*a^2*A + 3*A*b^2 + 9*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(9*a^2*A + 33*A*b^2 + 15*a^2*C - 5*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A + 8*A*b^2 + 5*a^2*C)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (4*A*b*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 8, -((2*b*(15*a^2*A - 5*A*b^2 - 15*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*a*(a^2*A + 9*A*b^2 + 3*a^2*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (8*a*b^2*(10*A - 3*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b^2*(35*A - 3*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (4*A*b*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 8, -((2*a*(5*a^2*A - 15*A*b^2 - 5*a^2*C - 9*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*b*(63*a^2*A + 7*A*b^2 + 21*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(105*a^2*A - 35*A*b^2 - 57*a^2*C - 25*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (2*a*b*(35*A - 11*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Sqrt[Sec[c + d*x]]) - (2*b*(7*A - C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 8, (2*b*(45*a^2*A + 9*A*b^2 + 27*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*a*(21*a^2*A + 21*A*b^2 + 7*a^2*C + 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (8*a*(63*A*b^2 + 4*a^2*C + 44*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (2*(63*A*b^2 + 24*a^2*C + 49*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (4*a*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 9, (2*a*(5*a^2*A + 9*A*b^2 + 3*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*b*(231*a^2*A + 55*A*b^2 + 165*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (8*a*(132*A*b^2 + 4*a^2*C + 101*b^2*C)*Sin[c + d*x])/(1155*d*Sec[c + d*x]^(3/2)) + (2*(33*A*b^2 + 8*a^2*C + 27*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(231*d*Sec[c + d*x]^(3/2)) + (4*a*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(33*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(11*d*Sec[c + d*x]^(3/2)) + (2*b*(231*a^2*A + 55*A*b^2 + 165*a^2*C + 45*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 10, (2*b*(351*a^2*A + 91*A*b^2 + 273*a^2*C + 77*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(195*d) + (2*a*(77*a^2*A + 165*A*b^2 + 55*a^2*C + 135*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (8*a*(715*A*b^2 + 12*a^2*C + 578*b^2*C)*Sin[c + d*x])/(9009*d*Sec[c + d*x]^(5/2)) + (2*(143*A*b^2 + 24*a^2*C + 121*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(1287*d*Sec[c + d*x]^(5/2)) + (12*a*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(143*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(13*d*Sec[c + d*x]^(5/2)) + (2*b*(351*a^2*A + 91*A*b^2 + 273*a^2*C + 77*b^2*C)*Sin[c + d*x])/(585*d*Sec[c + d*x]^(3/2)) + (2*a*(77*a^2*A + 165*A*b^2 + 55*a^2*C + 135*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(13/2), x, 10, -((8*a*b*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (8*a*b*(7*a^2*A + 9*A*b^2 + 9*a^2*C + 15*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 825*a^4*C + 4653*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (4*b*(673*a^2*A + 96*A*b^2 + 891*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3465*d) + (2*(27*a^2*A + 16*A*b^2 + 33*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(231*d) + (16*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(99*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(11/2)*Sin[c + d*x])/(11*d)}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (8*a*b*(5*a^2*A + 7*A*b^2 + 7*a^2*C + 21*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(147*a^4*A + 883*a^2*A*b^2 + 128*A*b^4 + 189*a^4*C + 1533*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (4*b*(101*a^2*A + 32*A*b^2 + 147*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 48*A*b^2 + 63*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (16*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 9, -((8*a*b*(3*a^2*A + 5*A*b^2 + 5*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b^2*(227*a^2*A + 279*A*b^2 + 385*a^2*C - 35*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (4*b*(101*a^2*A + 96*A*b^2 + 175*a^2*C)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 48*A*b^2 + 35*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (16*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 9, -((2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (8*a*b*(a^2*A + 3*A*b^2 + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*a*b*(9*a^2*A + 73*A*b^2 + 15*a^2*C - 17*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(9*a^2*A + 59*A*b^2 + 15*a^2*C - 3*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A + 16*A*b^2 + 5*a^2*C)*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (16*A*b*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 9, -((8*a*b*(5*a^2*A - 5*A*b^2 - 5*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b^2*(385*a^2*A - 35*A*b^2 - 141*a^2*C - 25*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (4*a*b^2*(175*A - 27*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (2*b^2*(21*A - C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]]) + (16*A*b*(a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 9, -((2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (8*a*b*(21*a^2*A + 7*A*b^2 + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*a*b*(315*a^2*A - 357*A*b^2 - 187*a^2*C - 251*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) - (2*b*(315*a^2*A - 63*A*b^2 - 123*a^2*C - 49*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) - (2*a*b*(21*A - 5*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) - (2*b*(9*A - C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^4*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 9, (8*a*b*(15*a^2*A + 9*A*b^2 + 9*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sin[c + d*x])/(3465*d*Sqrt[Sec[c + d*x]]) + (4*a*(891*A*b^2 + 96*a^2*C + 673*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d*Sqrt[Sec[c + d*x]]) + (2*(33*A*b^2 + 16*a^2*C + 27*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]]) + (16*a*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^4*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 10, (2*(195*a^4*A + 702*a^2*A*b^2 + 91*A*b^4 + 117*a^4*C + 546*a^2*b^2*C + 77*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(195*d) + (8*a*b*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(33319*a^2*A*b^2 + 7007*A*b^4 + 384*a^4*C + 25217*a^2*b^2*C + 5929*b^4*C)*Sin[c + d*x])/(45045*d*Sec[c + d*x]^(3/2)) + (4*a*(1573*A*b^2 + 96*a^2*C + 1259*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9009*d*Sec[c + d*x]^(3/2)) + (2*(143*A*b^2 + 48*a^2*C + 121*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(1287*d*Sec[c + d*x]^(3/2)) + (16*a*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(143*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(13*d*Sec[c + d*x]^(3/2)) + (8*a*b*(77*a^2*A + 55*A*b^2 + 55*a^2*C + 45*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/(a + b*Cos[c + d*x]), x, 9, -((2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*a^3*d)) - (2*A*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^2*d) - (2*b*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a + b)*d) + (2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*a^3*d) - (2*A*b*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*d) + (2*A*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x]), x, 8, (2*A*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*A*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a*d) + (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d) - (2*A*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*d) + (2*A*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]), x, 7, -((2*A*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d)) + (2*C*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d) - (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a + b)*d) + (2*A*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*d)}
{((A + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x]), x, 6, (2*C*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d) - (2*a*C*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d) + (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d)}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]), x, 7, -((2*a*C*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d)) + (2*(3*A*b^2 + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^3*d) - (2*a*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) + (2*C*Sin[c + d*x])/(3*b*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)), x, 8, (2*(5*A*b^2 + 5*a^2*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*b^3*d) - (2*a*(3*A*b^2 + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^4*d) + (2*a^2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^4*(a + b)*d) + (2*C*Sin[c + d*x])/(5*b*d*Sec[c + d*x]^(3/2)) - (2*a*C*Sin[c + d*x])/(3*b^2*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)), x, 9, -((2*a*(5*A*b^2 + 5*a^2*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*b^4*d)) + (2*(21*a^2*A*b^2 + 7*A*b^4 + 21*a^4*C + 7*a^2*b^2*C + 5*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*b^5*d) - (2*a^3*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^5*(a + b)*d) + (2*C*Sin[c + d*x])/(7*b*d*Sec[c + d*x]^(5/2)) - (2*a*C*Sin[c + d*x])/(5*b^2*d*Sec[c + d*x]^(3/2)) + (2*(7*A*b^2 + 7*a^2*C + 5*b^2*C)*Sin[c + d*x])/(21*b^3*d*Sqrt[Sec[c + d*x]])}


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^2, x, 9, (b*(4*a^2*A - 5*A*b^2 - a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 - 3*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d) + ((7*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) - (b*(4*a^2*A - 5*A*b^2 - a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 - 3*a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^2, x, 8, -(((2*a^2*A - 3*A*b^2 - a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d)) + ((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d) - ((5*a^2*A*b^2 - 3*A*b^4 + a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*b*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 - a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^2, x, 7, -(((A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d)) - ((A*b^2 - a^2*C + 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) + ((3*a^2*A*b^2 - A*b^4 - a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]), x, 7, ((A*b^2 + 3*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) + (a*(A*b^2 - 3*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) - ((a^2*A*b^2 + A*b^4 - 3*a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)), x, 8, -((a*(A*b^2 + 5*a^2*C - 4*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d)) + ((3*a^2*A*b^2 - 6*A*b^4 + 15*a^4*C - 16*a^2*b^2*C - 2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^4*(a^2 - b^2)*d) - (a*(a^2*A*b^2 - 3*A*b^4 + 5*a^4*C - 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^4*(a + b)^2*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) + ((3*A*b^2 + 5*a^2*C - 2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)), x, 9, ((15*a^2*A*b^2 - 10*A*b^4 + 35*a^4*C - 24*a^2*b^2*C - 6*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*b^4*(a^2 - b^2)*d) - (a*(9*a^2*A*b^2 - 12*A*b^4 + 21*a^4*C - 20*a^2*b^2*C - 4*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^5*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b^2 - 5*A*b^4 + 7*a^4*C - 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^5*(a + b)^2*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)) + ((5*A*b^2 + 7*a^2*C - 2*b^2*C)*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - (a*(3*A*b^2 + 7*a^2*C - 4*b^2*C)*Sin[c + d*x])/(3*b^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^3, x, 10, (b*(24*a^4*A - 65*a^2*A*b^2 + 35*A*b^4 - 9*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 - 21*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*a^3*(a^2 - b^2)^2*d) + ((63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) - (b*(24*a^4*A - 65*a^2*A*b^2 + 35*A*b^4 - 9*a^4*C + 3*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 - 21*a^4*C + 3*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 + 5*a^4*C + a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^3, x, 9, -(((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 - 5*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d)) + ((11*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d) - ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*b*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 - 5*a^4*C - a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^3, x, 8, -(((9*a^2*A*b^2 - 3*A*b^4 + a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d)) - ((7*a^2*A*b^2 - A*b^4 - a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d) + ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + ((9*a^2*A*b^2 - 3*A*b^4 + a^4*C + 5*a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]), x, 8, ((5*a^2*A*b^2 + A*b^4 - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + 3*a^4*C - 5*a^2*b^2*C + 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) - ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) - ((5*a^2*A*b^2 + A*b^4 - 3*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)), x, 8, -(((a^2*A*b^2 + 5*A*b^4 - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d)) + (a*(a^2*A*b^2 - 7*A*b^4 - 15*a^4*C + 33*a^2*b^2*C - 24*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) - ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)) + ((3*a^2*A*b^2 + 3*A*b^4 - 5*a^4*C + 11*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)), x, 9, -((a*(3*a^2*A*b^2 - 9*A*b^4 + 35*a^4*C - 65*a^2*b^2*C + 24*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d)) + ((9*a^4*A*b^2 - 15*a^2*A*b^4 + 24*A*b^6 + 105*a^6*C - 223*a^4*b^2*C + 128*a^2*b^4*C + 8*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*b^5*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^5*(a + b)^3*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)) + ((a^2*A*b^2 + 5*A*b^4 - 7*a^4*C + 13*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) + ((3*a^2*A*b^2 - 21*A*b^4 + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)), x, 10, ((75*a^4*A*b^2 - 145*a^2*A*b^4 + 40*A*b^6 + 315*a^6*C - 561*a^4*b^2*C + 192*a^2*b^4*C + 24*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(20*b^5*(a^2 - b^2)^2*d) - (a*(15*a^4*A*b^2 - 33*a^2*A*b^4 + 24*A*b^6 + 63*a^6*C - 129*a^4*b^2*C + 64*a^2*b^4*C + 8*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^6*(a^2 - b^2)^2*d) + (a^2*(15*a^4*A*b^2 - 38*a^2*A*b^4 + 35*A*b^6 + 63*a^6*C - 150*a^4*b^2*C + 99*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^6*(a + b)^3*d) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)) - ((a^2*A*b^2 - 7*A*b^4 + 9*a^4*C - 15*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)) + ((15*a^2*A*b^2 - 45*A*b^4 + 63*a^4*C - 101*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(20*b^3*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)) - (a*(5*a^2*A*b^2 - 11*A*b^4 + 21*a^4*C - 35*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(4*b^4*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4*A + 111*a^3*A*b - 24*a^2*A*b^2 - 4*a*A*b^3 - 16*A*b^4 + 189*a^4*C + 147*a^3*b*C - 42*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(13*a^2*A + 8*A*b^2 + 21*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a^3*d) + (2*(49*a^2*A - 6*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*a^2*d) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^4*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*b*(a + b)*(19*a^2*A + 8*A*b^2 + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 35*a^3*C + 35*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A - 4*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a^2*d) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*b*(19*a^2*A + 8*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*(a + b)*(9*a^2*A - 2*A*b^2 + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 15*a^2*C + 15*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A - 2*A*b^2 + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 8, -((2*A*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + 3*a*C - 3*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 8, -(((a + b)*(2*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b - a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((2*A - C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Sec[c + d*x]])}
{Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 8, (a*(a + b)*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A - 4*A*b + a*C - 2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (a*C*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 9, ((a + b)*(24*A*b^2 - 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(24*A*b - a*C + 14*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(8*A*b^2 + a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + (a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 - 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b^2*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 10, (a*(a + b)*(48*A*b^2 + 15*a^2*C + 28*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a*A*b^2 - 96*A*b^3 - 5*a^3*C - 2*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((16*a^2*A*b^2 - 64*A*b^4 + 5*a^4*C + 8*a^2*b^2*C - 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sec[c + d*x]^(5/2)) + (a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*b*d*Sec[c + d*x]^(3/2)) + ((48*A*b^2 - 5*a^2*C + 36*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b^2*d*Sqrt[Sec[c + d*x]]) + (a*(48*A*b^2 + 15*a^2*C + 28*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b^3*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 189*a^4*C + 252*a^3*b*C + 63*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*(44*a^2*A - 2*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*a*d) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(21*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^3*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((4*b*(a + b)*(41*a^2*A - 3*A*b^2 + 70*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 35*a^3*C + 140*a^2*b*C + 105*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 3*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a*d) + (6*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (4*b*(41*a^2*A - 3*A*b^2 + 70*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 9, -((2*(a + b)*(3*a^2*A + A*b^2 + 5*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2*A + 4*a*A*b + A*b^2 + 5*a^2*C + 10*a*b*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(3*a^2*A + A*b^2 + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*a*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 9, -((b*(a + b)*(8*A - 3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*C - 6*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (6*a*b*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) - (b*(8*A - 3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 9, -((a*(a + b)*(8*A - 5*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^2*A + 8*a*A*b - 4*A*b^2 - 4*a^2*C + a*b*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 3*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*A - C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - (a*(8*A - 5*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 9, ((a + b)*(24*A*b^2 + 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(24*a*A - 48*A*b + 7*a*C - 26*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(24*A*b^2 - a^2*C + 12*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) + (C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 + 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 10, (a*(a + b)*(80*A*b^2 - 3*a^2*C + 52*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((64*a^2*A*b - 16*a*A*b^2 + 32*A*b^3 - a^3*C + 38*a^2*b*C - 12*a*b^2*C + 24*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(8*d*Sec[c + d*x]^(3/2)) + (C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d*Sec[c + d*x]^(3/2)) + ((16*A*b^2 + a^2*C + 12*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*b*d*Sqrt[Sec[c + d*x]]) + (a*(80*A*b^2 - 3*a^2*C + 52*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(64*b^2*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(13/2), x, 10, -((2*b*(a + b)*(741*a^4*A + 51*a^2*A*b^2 + 8*A*b^4 + 957*a^4*C + 99*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(693*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(693*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(135*a^5*A + 741*a^4*A*b + 663*a^3*A*b^2 + 51*a^2*A*b^3 + 2*a*A*b^4 + 8*A*b^5 + 165*a^5*C + 957*a^4*b*C + 891*a^3*b^2*C + 99*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(135*a^4*A + 205*a^2*A*b^2 - 4*A*b^4 + 165*a^4*C + 297*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(693*a^2*d) + (2*b*(229*a^2*A + 3*A*b^2 + 297*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(693*a*d) + (2*(27*a^2*A + 5*A*b^2 + 33*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(231*d) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(99*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(11/2)*Sin[c + d*x])/(11*d) + (2*b*(741*a^4*A + 51*a^2*A*b^2 + 8*A*b^4 + 957*a^4*C + 99*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(693*a^3*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 189*a^4*C + 357*a^3*b*C + 483*a^2*b^2*C + 315*a*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*b*(163*a^2*A + 5*A*b^2 + 231*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a*d) + (2*(49*a^2*A + 15*A*b^2 + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 10, -((2*b*(a + b)*(29*a^2*A + 3*A*b^2 + 49*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(21*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(5*a^3*A + 29*a^2*A*b + 27*a*A*b^2 + 3*A*b^3 + 7*a^3*C + 49*a^2*b*C + 63*a*b^2*C - 21*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(21*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*a^2*A + 3*A*b^2 + 7*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*b*(29*a^2*A + 3*A*b^2 + 49*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(21*a*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 10, -(((a + b)*(18*a^2*A + 46*A*b^2 + 30*a^2*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 15*a^3*C + 45*a^2*b*C - 45*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (10*a*b^2*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 5*A*b^2 + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*A*b*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) - ((18*a^2*A + 46*A*b^2 + 30*a^2*C - 15*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 10, -((a*b*(a + b)*(56*A - 27*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^3*A + 28*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 12*a^3*C - 36*a^2*b*C + 3*a*b^2*C - 6*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(6*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(8*A*b^2 + 15*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b^2*(8*A - C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (10*A*b*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) - (a*b*(56*A - 27*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 10, -(((a + b)*(48*a^2*A - 24*A*b^2 - 33*a^2*C - 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + (a*(24*a^2*A + 72*a*A*b - 72*A*b^2 - 24*a^2*C + 13*a*b*C - 38*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (5*a*(8*A*b^2 + a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (a*b*(8*A - 3*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) - (b*(6*A - C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((48*a^2*A - 24*A*b^2 - 33*a^2*C - 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 10, (a*(a + b)*(432*A*b^2 + 15*a^2*C + 284*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((192*a^3*A - 576*a^2*A*b + 48*a*A*b^2 - 96*A*b^3 + 59*a^3*C - 322*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*A*b^2 + 5*a^2*C + 12*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*d*Sqrt[Sec[c + d*x]]) + (5*a*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(24*d*Sqrt[Sec[c + d*x]]) + (C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) + (a*(432*A*b^2 + 15*a^2*C + 284*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(A + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 11, ((a + b)*(2640*a^2*A*b^2 + 1280*A*b^4 - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(1920*a^2*A*b - 1040*a*A*b^2 + 3040*A*b^3 - 15*a^3*C + 1146*a^2*b*C - 772*a*b^2*C + 2312*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(80*a^2*A*b^2 + 320*A*b^4 + 3*a^4*C + 40*a^2*b^2*C + 240*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((80*A*b^2 + 15*a^2*C + 64*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d*Sec[c + d*x]^(3/2)) + (a*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(8*d*Sec[c + d*x]^(3/2)) + (C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (a*(1040*A*b^2 + 15*a^2*C + 772*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d*Sqrt[Sec[c + d*x]]) + ((2640*a^2*A*b^2 + 1280*A*b^4 - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(1920*b^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2))/Sqrt[a + b*Cos[c + d*x]], x, 8, (4*b*(a + b)*(22*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A - 44*a^2*A*b - 12*a*A*b^2 - 48*A*b^3 + 35*a^3*C - 70*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a^3*d) - (12*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*a^2*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*a*d) - (4*b*(22*a^2*A + 24*A*b^2 + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^4*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, -((2*(a + b)*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (8*A*b*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a^2*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a*d) + (2*(9*a^2*A + 8*A*b^2 + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^3*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/Sqrt[a + b*Cos[c + d*x]], x, 6, (4*A*b*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d) - (4*A*b*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, -((2*A*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A - C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, ((a + b)*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) - (2*a*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(1/2)), x, 8, -((3*a*(a + b)*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]])) - ((4*A*b - a*C + 2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 3*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d*Sqrt[Sec[c + d*x]]) - (3*a*C*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^2*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/(Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)), x, 9, ((a + b)*(24*A*b^2 + 15*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(5*a + 2*b)*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (a*(8*A*b^2 + 5*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d*Sec[c + d*x]^(3/2)) - (5*a*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b^2*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 + 15*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b^3*d*Sqrt[Sec[c + d*x]])}


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(3*a^4*A + 8*a^2*A*b^2 - 16*A*b^4 + 5*a^4*C - 10*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*a^4*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3*A - 4*a^2*A*b + 12*a*A*b^2 - 16*A*b^3 + 5*a^3*C - 10*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(5*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*(3*a^2*A - 8*A*b^2 - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*a^3*(a^2 - b^2)*d) + (2*(A*b^2 + a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*A*b^2 - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d) + (2*(3*a^4*A + 8*a^2*A*b^2 - 16*A*b^4 + 5*a^4*C - 10*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*a^4*(a^2 - b^2)*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*b*(5*a^2*A - 8*A*b^2 - 3*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) - (2*b*(5*a^2*A - 8*A*b^2 - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a^2*A - 2*A*b^2 - a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A - 2*A*b - a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 - a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A + C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Tan[(1/2)*(c + d*x)])/(a*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(1/2)), x, 8, ((2*A*b^2 + 3*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (6*a*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) + ((2*A*b^2 + 3*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)), x, 9, -((a*(8*A*b^2 + 15*a^2*C - 7*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*A*b^2 + 5*a^2*C - 3*a*b*C + 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*(a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 15*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)) + ((4*A*b^2 + 5*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) - (a*(8*A*b^2 + 15*a^2*C - 7*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^(5/2), x, 8, (4*b*(4*a^4*A - 14*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 9*a^3*A*b + 16*a^2*A*b^2 + 12*a*A*b^3 - 16*A*b^4 + 3*a^4*C + 3*a^3*b*C - 2*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*(5*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 - 5*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d) - (4*b*(4*a^4*A - 14*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^4*(a^2 - b^2)^2*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 - 3*a^3*C - a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (4*(4*a^2*A*b^2 - 2*A*b^4 + a^4*C + a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 - 3*a^4*C - a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{((A + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/(a + b*Cos[c + d*x])^(5/2), x, 6, -((4*b*(3*a^2*A - A*b^2 + 2*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 + a^2*C + 3*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (4*b*(3*a^2*A - A*b^2 + 2*a^2*C)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(1/2)), x, 8, (2*(3*a^2*A*b^2 + A*b^4 - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b + A*b^2 - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A*b^2 + A*b^4 - 3*a^4*C + 7*a^2*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(3/2)), x, 9, -(((8*A*b^4 - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A*b^2 + 3*A*b^3 - 5*a^3*C + 3*a^2*b*C + 6*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (10*a*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 - 5*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) - ((8*A*b^4 - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


(* ::Section:: *)
(*Cos[c+d x]^m (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, (1/8)*(4*a*B + 3*b*C)*x + (2*(b*B + a*C)*Sin[c + d*x])/(3*d) + ((4*a*B + 3*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*b*B + a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 3, (1/2)*(b*B + a*C)*x + ((3*a*b*B - a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b*d) + ((3*b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 3, (1/2)*(2*a*B + b*C)*x + ((2*b*B + a*C)*Sin[c + d*x])/(2*d) + (C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, (b*B + a*C)*x + (a*B*ArcTanh[Sin[c + d*x]])/d + (b*C*Sin[c + d*x])/d}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, b*C*x + ((b*B + a*C)*ArcTanh[Sin[c + d*x]])/d + (a*B*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, ((a*B + 2*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((b*B + a*C)*Tan[c + d*x])/d + (a*B*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^5*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 6, ((b*B + a*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a*B + 3*b*C)*Tan[c + d*x])/(3*d) + ((b*B + a*C)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (a*B*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^6*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 7, ((3*a*B + 4*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(b*B + a*C)*Tan[c + d*x])/(3*d) + ((3*a*B + 4*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((b*B + a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (a*B*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, (1/8)*(4*a^2*B + 3*b^2*B + 6*a*b*C)*x + (2*(10*a*b*B + 5*a^2*C + 4*b^2*C)*Sin[c + d*x])/(15*d) + ((4*a^2*B + 3*b^2*B + 6*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((25*a*b*B + 2*a^2*C + 16*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(60*d) + ((5*b*B + 2*a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(20*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(8*a*b*B + 4*a^2*C + 3*b^2*C)*x + ((4*a^2*b*B + 4*b^3*B - a^3*C + 8*a*b^2*C)*Sin[c + d*x])/(6*b*d) + ((8*a*b*B - 2*a^2*C + 9*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + ((4*b*B - a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*b*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 4, (1/2)*(2*a^2*B + b^2*B + 2*a*b*C)*x + ((9*a*b*B + 2*a^2*C + 4*b^2*C)*Sin[c + d*x])/(6*d) + ((3*b*B + 2*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, (1/2)*(4*a*b*B + 2*a^2*C + b^2*C)*x + (a^2*B*ArcTanh[Sin[c + d*x]])/d + (b*(2*b*B + 3*a*C)*Sin[c + d*x])/(2*d) + (b*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, (b^2*B + 2*a*b*C)*x + (a*(2*b*B + a*C)*ArcTanh[Sin[c + d*x]])/d - (b*(a*B - b*C)*Sin[c + d*x])/d + (a*B*(a + b*Cos[c + d*x])*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, b^2*C*x + ((a^2*B + 2*b^2*B + 4*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(3*b*B + 2*a*C)*Tan[c + d*x])/(2*d) + (a*B*(b + a*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^5*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, ((2*a*b*B + a^2*C + 2*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a^2*B + 3*b^2*B + 6*a*b*C)*Tan[c + d*x])/(3*d) + (a*(4*b*B + 3*a*C)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (a*B*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^6*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 7, ((3*a^2*B + 4*b^2*B + 8*a*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((4*a*b*B + 2*a^2*C + 3*b^2*C)*Tan[c + d*x])/(3*d) + ((3*a^2*B + 4*b^2*B + 8*a*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(5*b*B + 4*a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (a*B*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*(12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*x + ((15*a^3*b*B + 60*a*b^3*B - 3*a^4*C + 52*a^2*b^2*C + 16*b^4*C)*Sin[c + d*x])/(30*b*d) + ((30*a^2*b*B + 45*b^3*B - 6*a^3*C + 71*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((15*a*b*B - 3*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*b*d) + ((5*b*B - a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*b*d) + (C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*(8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*x + ((44*a^2*b*B + 16*b^3*B + 6*a^3*C + 39*a*b^2*C)*Sin[c + d*x])/(24*d) + ((20*a*b*B + 6*a^2*C + 9*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (1/2)*(6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*C)*x + (a^3*B*ArcTanh[Sin[c + d*x]])/d + (b*(15*a*b*B + 11*a^2*C + 4*b^2*C)*Sin[c + d*x])/(6*d) + (b*(3*b*B + 5*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (b*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (1/2)*b*(6*a*b*B + 6*a^2*C + b^2*C)*x + (a^2*(3*b*B + a*C)*ArcTanh[Sin[c + d*x]])/d - (b*(2*a^2*B - 2*b^2*B - 5*a*b*C)*Sin[c + d*x])/(2*d) - (b*(2*a*B - b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (a*B*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (b^3*B + 3*a*b^2*C)*x + (a*(a^2*B + 6*b^2*B + 6*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(5*a*b*B + 2*a^2*C - 2*b^2*C)*Sin[c + d*x])/(2*d) + (a*(2*b*B + a*C)*(a + b*Cos[c + d*x])*Tan[c + d*x])/d + (a*B*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^5*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, b^3*C*x + ((3*a^2*b*B + 2*b^3*B + a^3*C + 6*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(4*a^2*B + 11*b^2*B + 15*a*b*C)*Tan[c + d*x])/(6*d) + (a*(5*b*B + 3*a*C)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (a*B*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^6*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, ((3*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 8*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((6*a^2*b*B + 3*b^3*B + 2*a^3*C + 9*a*b^2*C)*Tan[c + d*x])/(3*d) + (a*(9*a^2*B + 18*b^2*B + 28*a*b*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (a*(3*b*B + 2*a*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(6*d) + (a*B*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^7*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 8, ((9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((8*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 15*b^3*C)*Tan[c + d*x])/(15*d) + ((9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*(16*a^2*B + 27*b^2*B + 45*a*b*C)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + (a*(7*b*B + 5*a*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (a*B*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, ((2*a^2*b*B + b^3*B - 2*a^3*C - a*b^2*C)*x)/(2*b^4) - (2*a^3*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) - ((3*a*b*B - 3*a^2*C - 2*b^2*C)*Sin[c + d*x])/(3*b^3*d) + ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) + (C*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, -(((2*a*b*B - 2*a^2*C - b^2*C)*x)/(2*b^3)) + (2*a^2*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((b*B - a*C)*Sin[c + d*x])/(b^2*d) + (C*Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, ((b*B - a*C)*x)/b^2 - (2*a*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (C*x)/b + (2*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, -((2*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)) + (B*ArcTanh[Sin[c + d*x]])/(a*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*b*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - ((b*B - a*C)*ArcTanh[Sin[c + d*x]])/(a^2*d) + (B*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, -((2*b^2*(b*B - a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d)) + ((a^2*B + 2*b^2*B - 2*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - ((b*B - a*C)*Tan[c + d*x])/(a^2*d) + (B*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}


{Cos[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, -(((4*a*b*B - 6*a^2*C - b^2*C)*x)/(2*b^4)) + (2*a^2*(2*a^2*b*B - 3*b^3*B - 3*a^3*C + 4*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) + ((2*a^2*b*B - b^3*B - 3*a^3*C + 2*a*b^2*C)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) - ((2*a*b*B - 3*a^2*C + b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 4, ((b*B - 2*a*C)*x)/b^3 - (2*a*(a^2*b*B - 2*b^3*B - 2*a^3*C + 3*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) - ((a*b*B - 2*a^2*C + b^2*C)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, (C*x)/b^2 - (2*(b^3*B + a^3*C - 2*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) + (a*(b*B - a*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, (2*(a*B - b*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) - ((b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, -((2*(2*a^2*b*B - b^3*B - a^3*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d)) + (B*ArcTanh[Sin[c + d*x]])/(a^2*d) + ((b*B - a*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d) - ((b*B - a*C)*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, (2*b*(3*a^2*b*B - 2*b^3*B - 2*a^3*C + a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) - ((2*b*B - a*C)*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2*B - 2*b^2*B + a*b*C)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + ((b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d) - ((b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, -(((6*a*b*B - 12*a^2*C - b^2*C)*x)/(2*b^5)) + (a^2*(6*a^4*b*B - 15*a^2*b^3*B + 12*b^5*B - 12*a^5*C + 29*a^3*b^2*C - 20*a*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) + ((6*a^4*b*B - 11*a^2*b^3*B + 2*b^5*B - 12*a^5*C + 21*a^3*b^2*C - 6*a*b^4*C)*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) - ((3*a^3*b*B - 6*a*b^3*B - 6*a^4*C + 10*a^2*b^2*C - b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(b*B - a*C)*Cos[c + d*x]^3*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(2*a^2*b*B - 5*b^3*B - 4*a^3*C + 7*a*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 5, ((b*B - 3*a*C)*x)/b^4 - (a*(2*a^4*b*B - 5*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 15*a^3*b^2*C - 12*a*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((2*a^3*b*B - 5*a*b^3*B - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, (C*x)/b^3 + ((a^2*b^3*B + 2*b^5*B - 2*a^5*C + 5*a^3*b^2*C - 6*a*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) + (a*(b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (a*(3*b^3*B + 2*a^3*C - 5*a*b^2*C)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, -(((3*a*b*B - a^2*C - 2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) + (a*(b*B - a*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*b*B + 2*b^3*B + a^3*C - 4*a*b^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, ((2*a^2*B + b^2*B - 3*a*b*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - ((b*B - a*C)*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((3*a*b*B - a^2*C - 2*b^2*C)*Sin[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, -(((6*a^4*b*B - 5*a^2*b^3*B + 2*b^5*B - 2*a^5*C - a^3*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d)) + (B*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((5*a^2*b*B - 2*b^3*B - 3*a^3*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d) - ((b*B - a*C)*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((4*a^2*b*B - b^3*B - 2*a^3*C - a*b^2*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, (b*(12*a^4*b*B - 15*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 5*a^3*b^2*C - 2*a*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) - ((3*b*B - a*C)*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4*B - 11*a^2*b^2*B + 6*b^4*B + 5*a^3*b*C - 2*a*b^3*C)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((6*a^2*b*B - 3*b^3*B - 4*a^3*C + a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d) - ((b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((5*a^2*b*B - 2*b^3*B - 3*a^3*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 8, (-2*(a + b)*(14*a^2*b*B - 63*b^3*B - 8*a^3*C - 19*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(14*a^3*b*B - 14*a*b^3*B - 8*a^4*C - 17*a^2*b^2*C + 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(7*a*b*B - 4*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^2*d) + (2*(7*b*B + a*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b*d) + (2*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(5*a*b*B - 2*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*b*B - 5*b^3*B - 2*a^3*C + 2*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B - 2*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(3*b*B + a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(a^2 - b^2)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 9, (2*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 10, -(((a + b)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a*B + 2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + ((b*B + 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 11, -(((a + b)*(b*B + 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*b*B + 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*B - b^2*B + 4*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((b*B + 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a*d) + (B*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 9, (-2*(a + b)*(18*a^3*b*B - 246*a*b^3*B - 8*a^4*C - 33*a^2*b^2*C - 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(18*a^4*b*B - 93*a^2*b^3*B + 75*b^5*B - 8*a^5*C - 31*a^3*b^2*C + 39*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*b*B + 75*b^3*B - 4*a^3*C + 88*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(72*a*b*B + 3*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(3*b*B + a*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(a + b)*(21*a^2*b*B + 63*b^3*B - 6*a^3*C + 82*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(21*a^3*b*B - 21*a*b^3*B - 6*a^4*C + 31*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(21*a*b*B - 6*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b*d) + (2*(7*b*B - 2*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*b*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(a + b)*(20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*b*B - 5*b^3*B + 3*a^3*C - 3*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, (2*(a + b)*(3*b*B + 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a*b*B - a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, -(((a + b)*(a*B - 2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a^2*B + 2*b^2*B + 2*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a*(3*b*B + 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (a*B*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 11, -(((a + b)*(5*b*B + 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((7*a*b*B + 4*a^2*C + 8*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*B + 3*b^2*B + 12*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((5*b*B + 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a*B*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^5*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 12, -(((a + b)*(16*a^2*B + 3*b^2*B + 30*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((16*a^2*B + 17*b^2*B + 42*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a^2*b*B - b^3*B + 8*a^3*C + 6*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*B + 3*b^2*B + 30*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a*d) + ((7*b*B + 6*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*d) + (a*B*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 10, (-2*(a + b)*(110*a^4*b*B - 3069*a^2*b^3*B - 1617*b^5*B - 40*a^5*C - 255*a^3*b^2*C - 3705*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(110*a^5*b*B - 1364*a^3*b^3*B + 1254*a*b^5*B - 40*a^6*C - 245*a^4*b^2*C - 390*a^2*b^4*C + 675*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(55*a^3*b*B + 1793*a*b^3*B - 20*a^4*C + 1025*a^2*b^2*C + 675*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b^2*d) + (2*(825*a^2*b*B + 539*b^3*B + 15*a^3*C + 1145*a*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b*d) + (2*(44*a*b*B + 5*a^2*C + 27*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(11*b*B + 5*a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(a + b)*(45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(45*a^4*b*B + 30*a^2*b^3*B - 75*b^5*B - 10*a^5*C + 124*a^3*b^2*C - 114*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(45*a^2*b*B + 75*b^3*B - 10*a^3*C + 114*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(45*a*b*B - 10*a^2*C + 49*b^2*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(315*b*d) + (2*(9*b*B - 2*a*C)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(63*b*d) + (2*C*(a + b*Cos[c + d*x])^(7/2)*Sin[c + d*x])/(9*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(a + b)*(161*a^2*b*B + 63*b^3*B + 15*a^3*C + 145*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(56*a^3*b*B - 56*a*b^3*B + 15*a^4*C + 10*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(56*a*b*B + 15*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(7*b*B + 5*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, (2*(a + b)*(35*a*b*B + 23*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(10*a^2*b*B + 5*b^3*B - 8*a^3*C + 8*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^3*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(5*b*B + 8*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -(((a + b)*(3*a^2*B - 6*b^2*B - 14*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*a^3*B + 12*a*b^2*B + 4*a^2*b*C + 2*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (a^2*(5*b*B + 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*(3*a*B - 2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (a*B*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -(((a + b)*(9*a*b*B + 4*a^2*C - 8*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((11*a^2*b*B + 8*b^3*B + 4*a^3*C + 16*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(4*a^2*B + 15*b^2*B + 20*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(7*b*B + 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (a*B*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^5*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 12, -(((a + b)*(16*a^2*B + 33*b^2*B + 54*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + ((16*a^3*B + 59*a*b^2*B + 66*a^2*b*C + 48*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((20*a^2*b*B + 5*b^3*B + 8*a^3*C + 30*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(8*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*B + 33*b^2*B + 54*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*d) + (a*(3*b*B + 2*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(4*d) + (a*B*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^6*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 13, -(((a + b)*(284*a^2*b*B + 15*b^3*B + 128*a^3*C + 264*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((356*a^2*b*B + 133*b^3*B + 128*a^3*C + 472*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*B + 120*a^2*b^2*B - 5*b^4*B + 160*a^3*b*C + 40*a*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((284*a^2*b*B + 15*b^3*B + 128*a^3*C + 264*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(192*a*d) + ((36*a^2*B + 59*b^2*B + 104*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(96*d) + (a*(11*b*B + 8*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(24*d) + (a*B*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 7, (-2*(a + b)*(10*a*b*B - 8*a^2*C - 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(10*a^2*b*B + 5*b^3*B - 8*a^3*C - 7*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B - 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^2*d) + (2*C*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*(3*b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*b*B - 2*a^2*C - b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 10, -(((a + b)*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - ((b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^4*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 11, ((a + b)*(3*b*B - 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((b*B - 4*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*B + 3*b^2*B - 4*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*b*B - 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^2*d) + (B*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}


{Cos[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 8, (-2*(40*a^3*b*B - 25*a*b^3*B - 48*a^4*C + 24*a^2*b^2*C + 9*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*(a - b)*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(40*a^2*b*B + 5*b^3*B - 48*a^3*C - 12*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(20*a^2*b*B - 5*b^3*B - 24*a^3*C + 9*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)*d) - (2*(5*a*b*B - 6*a^2*C + b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(6*a^2*b*B - 3*b^3*B - 8*a^3*C + 5*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(6*a*b*B - 8*a^2*C - b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*b*B - 4*a^2*C + b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(a*b*B - 2*a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Tan[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*(a^2 - b^2)*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 11, -(((a^2*B - 3*b^2*B + 2*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*B - 3*b^2*B + 2*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) - (2*(b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d)}


{Cos[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 16*a^5*C + 28*a^3*b^2*C - 8*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(8*a^3*b*B - 9*a*b^3*B - 16*a^4*C + 16*a^2*b^2*C + b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^4*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(3*a^2*b*B - 7*b^3*B - 6*a^3*C + 10*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*a^3*b*B - 8*a*b^3*B - 8*a^4*C + 13*a^2*b^2*C - b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (-2*(2*a^3*b*B - 6*a*b^3*B - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*a^2*b*B - 3*b^3*B - 8*a^3*C + 9*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(a^2*b*B - 5*b^3*B - 4*a^3*C + 8*a*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*b*B + 2*a^2*C - 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(4*a*b*B - a^2*C - 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(4*a*b*B - a^2*C - 3*b^2*C)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 11, -((2*(7*a^2*b*B - 3*b^3*B - 4*a^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(6*a^2*b*B - 2*b^3*B - 3*a^3*C - a*b^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(7*a^2*b*B - 3*b^3*B - 4*a^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 12, -(((3*a^4*B - 26*a^2*b^2*B + 15*b^4*B + 14*a^3*b*C - 6*a*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + ((3*a^2*B - 5*b^2*B + 2*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(a^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*B - 26*a^2*b^2*B + 15*b^4*B + 14*a^3*b*C - 6*a*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^3*(a^2 - b^2)^2*d) - (2*(b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(8*a^2*b*B - 4*b^3*B - 5*a^3*C + a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*b*B - 5*b^3*B - 6*a^3*C + 2*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 7, (2*(9*a*B + 7*b*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (10*(b*B + a*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (10*(b*B + a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(9*a*B + 7*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(9*b*B + 2*a*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d)}
{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 6, (6*(b*B + a*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(7*a*B + 5*b*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(7*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*b*B + 2*a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d)}
{((a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 5, (2*(5*a*B + 3*b*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(b*B + a*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*(5*b*B + 2*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{((a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 5, (2*(b*B + a*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(3*a*B + b*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{((a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 5, (-2*(a*B - b*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(b*B + a*C)*EllipticF[(c + d*x)/2, 2])/d + (2*a*B*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*(b*B + a*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(a*B + 3*b*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*B*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(b*B + a*C)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*(3*a*B + 5*b*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(b*B + a*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*B*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(b*B + a*C)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(3*a*B + 5*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 8, (2*(9*a^2*B + 7*b^2*B + 14*a*b*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (10*(22*a*b*B + 11*a^2*C + 9*b^2*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (10*(22*a*b*B + 11*a^2*C + 9*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(9*a^2*B + 7*b^2*B + 14*a*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(121*a*b*B + 8*a^2*C + 81*b^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (2*(11*b*B + 4*a*C)*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 7, (2*(18*a*b*B + 9*a^2*C + 7*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(7*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(7*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(81*a*b*B + 8*a^2*C + 49*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(9*b*B + 4*a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d)}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 6, (2*(5*a^2*B + 3*b^2*B + 6*a*b*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(14*a*b*B + 7*a^2*C + 5*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(49*a*b*B + 8*a^2*C + 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(7*b*B + 4*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 6, (2*(10*a*b*B + 5*a^2*C + 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(3*a^2*B + b^2*B + 2*a*b*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*(5*b*B + 7*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 6, (-2*(a^2*B - b^2*B - 2*a*b*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(6*a*b*B + 3*a^2*C + b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(3*a*B - b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*(2*a*b*B + a^2*C - b^2*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(a^2*B + 3*b^2*B + 6*a*b*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*(5*b*B + 3*a*C)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*(3*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(2*a*b*B + a^2*C + 3*b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*(7*b*B + 5*a*C)*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2*B + 5*b^2*B + 10*a*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, -((2*(6*a*b*B + 3*a^2*C + 5*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(5*a^2*B + 7*b^2*B + 14*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*a*(9*b*B + 7*a*C)*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(5*a^2*B + 7*b^2*B + 14*a*b*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(6*a*b*B + 3*a^2*C + 5*b^2*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a*B*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 8, (2*(27*a^2*b*B + 7*b^3*B + 9*a^3*C + 21*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*EllipticF[(c + d*x)/2, 2])/(231*d) + (2*(77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(979*a^2*b*B + 539*b^3*B + 48*a^3*C + 1212*a*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (2*(143*a*b*B + 24*a^2*C + 81*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(693*d) + (2*(11*b*B + 6*a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(11*d)}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 7, (2*(15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(21*a^2*b*B + 5*b^3*B + 7*a^3*C + 15*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*(171*a^2*b*B + 75*b^3*B + 16*a^3*C + 176*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(99*a*b*B + 24*a^2*C + 49*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d) + (2*(3*b*B + 2*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d)}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 7, (2*(15*a^2*b*B + 3*b^3*B + 5*a^3*C + 9*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(21*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 5*b^3*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*(84*a*b*B + 57*a^2*C + 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*b*(7*b*B + 11*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) + (2*b*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 7, (-2*(5*a^3*B - 15*a*b^2*B - 15*a^2*b*C - 3*b^3*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(9*a^2*b*B + b^3*B + 3*a^3*C + 3*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(15*a^2*B - 5*b^2*B - 12*a*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(5*a*B - b*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d) + (2*a*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 7, (-2*(3*a^2*b*B - b^3*B + a^3*C - 3*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(a^3*B + 9*a*b^2*B + 9*a^2*b*C + b^3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(8*a*b*B + 3*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*(7*b*B + 3*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*(3*a^3*B + 15*a*b^2*B + 15*a^2*b*C - 5*b^3*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(3*a^2*b*B + 3*b^3*B + a^3*C + 9*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*(9*a^2*B + 33*b^2*B + 40*a*b*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*a*(9*b*B + 5*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*a*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(9*a^2*b*B + 5*b^3*B + 3*a^3*C + 15*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(5*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 21*b^3*C)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*a*(25*a^2*B + 57*b^2*B + 84*a*b*C)*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*b*B + 5*b^3*B + 3*a^3*C + 15*a*b^2*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*a*(11*b*B + 7*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*a*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{((a + b*Cos[c + d*x])^3*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(13/2), x, 9, -((2*(7*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 15*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(15*a^2*b*B + 7*b^3*B + 5*a^3*C + 21*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*a*(49*a^2*B + 89*b^2*B + 144*a*b*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(15*a^2*b*B + 7*b^3*B + 5*a^3*C + 21*a*b^2*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(7*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 15*b^3*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*a*(13*b*B + 9*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*a*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 8, (2*(5*a^2*b*B + 3*b^3*B - 5*a^3*C - 3*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^4*d) - (2*(21*a^3*b*B + 7*a*b^3*B - 21*a^4*C - 7*a^2*b^2*C - 5*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*b^5*d) + (2*a^4*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^5*(a + b)*d) - (2*(7*a*b*B - 7*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*b^3*d) + (2*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*d) + (2*C*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 7, -((2*(5*a*b*B - 5*a^2*C - 3*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^3*d)) + (2*(3*a^2*b*B + b^3*B - 3*a^3*C - a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*d) - (2*a^3*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^4*(a + b)*d) + (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*d) + (2*C*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^(1/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*(b*B - a*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d) - (2*(3*a*b*B - 3*a^2*C - b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^3*d) + (2*a^2*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^(-1/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*C*EllipticE[(1/2)*(c + d*x), 2])/(b*d) + (2*(b*B - a*C)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*d) - (2*a*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d)}
{Cos[c + d*x]^(-3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (2*C*EllipticF[(1/2)*(c + d*x), 2])/(b*d) + (2*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b*(a + b)*d)}
{Cos[c + d*x]^(-5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, -((2*B*EllipticE[(1/2)*(c + d*x), 2])/(a*d)) - (2*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d) + (2*B*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 8, (2*(b*B - a*C)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d) + (2*B*EllipticF[(1/2)*(c + d*x), 2])/(3*a*d) + (2*b*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d) + (2*B*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(b*B - a*C)*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 9, -((2*(3*a^2*B + 5*b^2*B - 5*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*a^3*d)) - (2*(b*B - a*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^2*d) - (2*b^2*(b*B - a*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a + b)*d) + (2*B*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*(b*B - a*C)*Sin[c + d*x])/(3*a^2*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2*B + 5*b^2*B - 5*a*b*C)*Sin[c + d*x])/(5*a^3*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 8, -((25*a^3*b*B - 20*a*b^3*B - 35*a^4*C + 24*a^2*b^2*C + 6*b^4*C)*EllipticE[(c + d*x)/2, 2])/(5*b^4*(a^2 - b^2)*d) + ((15*a^4*b*B - 16*a^2*b^3*B - 2*b^5*B - 21*a^5*C + 20*a^3*b^2*C + 4*a*b^4*C)*EllipticF[(c + d*x)/2, 2])/(3*b^5*(a^2 - b^2)*d) - (a^3*(5*a^2*b*B - 7*b^3*B - 7*a^3*C + 9*a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^5*(a + b)^2*d) + ((5*a^2*b*B - 2*b^3*B - 7*a^3*C + 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)*d) - ((5*a*b*B - 7*a^2*C + 2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 7, ((3*a^2*b*B - 2*b^3*B - 5*a^3*C + 4*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(b^3*(a^2 - b^2)*d) - ((9*a^3*b*B - 12*a*b^3*B - 15*a^4*C + 16*a^2*b^2*C + 2*b^4*C)*EllipticF[(c + d*x)/2, 2])/(3*b^4*(a^2 - b^2)*d) + (a^2*(3*a^2*b*B - 5*b^3*B - 5*a^3*C + 7*a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^4*(a + b)^2*d) - ((3*a*b*B - 5*a^2*C + 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^2, x, 6, -(((a*b*B - 3*a^2*C + 2*b^2*C)*EllipticE[(c + d*x)/2, 2])/(b^2*(a^2 - b^2)*d)) + ((a^2*b*B - 2*b^3*B - 3*a^3*C + 4*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(b^3*(a^2 - b^2)*d) - (a*(a^2*b*B - 3*b^3*B - 3*a^3*C + 5*a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^3*(a + b)^2*d) + (a*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2), x, 6, ((b*B - a*C)*EllipticE[(c + d*x)/2, 2])/(b*(a^2 - b^2)*d) + ((a*b*B + a^2*C - 2*b^2*C)*EllipticF[(c + d*x)/2, 2])/(b^2*(a^2 - b^2)*d) - ((a^2*b*B + b^3*B + a^3*C - 3*a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/((a - b)*b^2*(a + b)^2*d) - ((b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2), x, 7, -(((b*B - a*C)*EllipticE[(c + d*x)/2, 2])/(a*(a^2 - b^2)*d)) - ((b*B - a*C)*EllipticF[(c + d*x)/2, 2])/(b*(a^2 - b^2)*d) + ((3*a^2*b*B - b^3*B - a^3*C - a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a*(a - b)*b*(a + b)^2*d) + ((b*B - a*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - ((b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2), x, 8, -(((2*a^2*B - 3*b^2*B + a*b*C)*EllipticE[(c + d*x)/2, 2])/(a^2*(a^2 - b^2)*d)) + ((b*B - a*C)*EllipticF[(c + d*x)/2, 2])/(a*(a^2 - b^2)*d) - ((5*a^2*b*B - 3*b^3*B - 3*a^3*C + a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^2*(a - b)*(a + b)^2*d) + ((b*B - a*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + ((2*a^2*B - 3*b^2*B + a*b*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - ((b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^2), x, 9, ((4*a^2*b*B - 5*b^3*B - 2*a^3*C + 3*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(a^3*(a^2 - b^2)*d) + ((2*a^2*B - 5*b^2*B + 3*a*b*C)*EllipticF[(c + d*x)/2, 2])/(3*a^2*(a^2 - b^2)*d) + (b*(7*a^2*b*B - 5*b^3*B - 5*a^3*C + 3*a*b^2*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(a^3*(a - b)*(a + b)^2*d) + ((b*B - a*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)) + ((2*a^2*B - 5*b^2*B + 3*a*b*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - ((4*a^2*b*B - 5*b^3*B - 2*a^3*C + 3*a*b^2*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - ((b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x]))}


{(Cos[c + d*x]^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 8, ((15*a^4*b*B - 29*a^2*b^3*B + 8*b^5*B - 35*a^5*C + 65*a^3*b^2*C - 24*a*b^4*C)*EllipticE[(c + d*x)/2, 2])/(4*b^4*(a^2 - b^2)^2*d) - ((45*a^5*b*B - 99*a^3*b^3*B + 72*a*b^5*B - 105*a^6*C + 223*a^4*b^2*C - 128*a^2*b^4*C - 8*b^6*C)*EllipticF[(c + d*x)/2, 2])/(12*b^5*(a^2 - b^2)^2*d) + (a^2*(15*a^4*b*B - 38*a^2*b^3*B + 35*b^5*B - 35*a^5*C + 86*a^3*b^2*C - 63*a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*(a - b)^2*b^5*(a + b)^3*d) - ((15*a^3*b*B - 33*a*b^3*B - 35*a^4*C + 61*a^2*b^2*C - 8*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) + (a*(b*B - a*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(3*a^2*b*B - 9*b^3*B - 7*a^3*C + 13*a*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 7, -((3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*EllipticE[(c + d*x)/2, 2])/(4*b^3*(a^2 - b^2)^2*d) + ((3*a^4*b*B - 5*a^2*b^3*B + 8*b^5*B - 15*a^5*C + 33*a^3*b^2*C - 24*a*b^4*C)*EllipticF[(c + d*x)/2, 2])/(4*b^4*(a^2 - b^2)^2*d) - (a*(3*a^4*b*B - 6*a^2*b^3*B + 15*b^5*B - 15*a^5*C + 38*a^3*b^2*C - 35*a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*(a - b)^2*b^4*(a + b)^3*d) + (a*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (a*(a^2*b*B - 7*b^3*B - 5*a^3*C + 11*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3, x, 7, -((a^2*b*B + 5*b^3*B + 3*a^3*C - 9*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*b^2*(a^2 - b^2)^2*d) + ((a^3*b*B - 7*a*b^3*B + 3*a^4*C - 5*a^2*b^2*C + 8*b^4*C)*EllipticF[(c + d*x)/2, 2])/(4*b^3*(a^2 - b^2)^2*d) - ((a^4*b*B - 10*a^2*b^3*B - 3*b^5*B + 3*a^5*C - 6*a^3*b^2*C + 15*a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*(a - b)^2*b^3*(a + b)^3*d) + (a*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*b*B + 5*b^3*B + 3*a^3*C - 9*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3), x, 7, ((5*a^2*b*B + b^3*B - a^3*C - 5*a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a*b*(a^2 - b^2)^2*d) + ((3*a^2*b*B + 3*b^3*B + a^3*C - 7*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(4*b^2*(a^2 - b^2)^2*d) - ((3*a^4*b*B + 10*a^2*b^3*B - b^5*B + a^5*C - 10*a^3*b^2*C - 3*a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a*(a - b)^2*b^2*(a + b)^3*d) - ((b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((5*a^2*b*B + b^3*B - a^3*C - 5*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3), x, 8, -((9*a^2*b*B - 3*b^3*B - 5*a^3*C - a*b^2*C)*EllipticE[(c + d*x)/2, 2])/(4*a^2*(a^2 - b^2)^2*d) - ((7*a^2*b*B - b^3*B - 3*a^3*C - 3*a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(4*a*b*(a^2 - b^2)^2*d) + ((15*a^4*b*B - 6*a^2*b^3*B + 3*b^5*B - 3*a^5*C - 10*a^3*b^2*C + a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a^2*(a - b)^2*b*(a + b)^3*d) + ((9*a^2*b*B - 3*b^3*B - 5*a^3*C - a*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) - ((b*B - a*C)*Sin[c + d*x])/(2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2) - ((7*a^2*b*B - b^3*B - 3*a^3*C - 3*a*b^2*C)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^3), x, 9, -((8*a^4*B - 29*a^2*b^2*B + 15*b^4*B + 9*a^3*b*C - 3*a*b^3*C)*EllipticE[(c + d*x)/2, 2])/(4*a^3*(a^2 - b^2)^2*d) + ((11*a^2*b*B - 5*b^3*B - 7*a^3*C + a*b^2*C)*EllipticF[(c + d*x)/2, 2])/(4*a^2*(a^2 - b^2)^2*d) - ((35*a^4*b*B - 38*a^2*b^3*B + 15*b^5*B - 15*a^5*C + 6*a^3*b^2*C - 3*a*b^4*C)*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2])/(4*a^3*(a - b)^2*(a + b)^3*d) + ((11*a^2*b*B - 5*b^3*B - 7*a^3*C + a*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) + ((8*a^4*B - 29*a^2*b^2*B + 15*b^4*B + 9*a^3*b*C - 3*a*b^3*C)*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) - ((b*B - a*C)*Sin[c + d*x])/(2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2) - ((9*a^2*b*B - 3*b^3*B - 5*a^3*C - a*b^2*C)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 8, ((a + b)*(6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*b*B - 12*b^2*B + a^2*C - 14*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((2*a^2*b*B - 8*b^3*B - a^3*C - 4*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^2*d)}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 7, ((a + b)*(4*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*B - a*C + 2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*b*B - a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b*d)}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 7, ((a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*B - b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/d}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 7, (-2*(a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*B + b*B + a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 6, (-2*(a + b)*(b*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*B + b*B + 3*a*C + 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a*d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*(a + b)*(9*a^2*B - 2*b^2*B + 5*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*B + 7*a*b*B - 2*b^2*B + 5*a^2*C + 5*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(b*B + 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*B - 2*b^2*B + 5*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*a^2*d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, -((2*(a + b)*(19*a^2*b*B + 8*b^3*B + 63*a^3*C - 14*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*B + 19*a^2*b*B + 2*a*b^2*B + 8*b^3*B + 63*a^3*C + 49*a^2*b*C - 14*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(b*B + 7*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*B - 4*b^2*B + 7*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Cos[c + d*x]^(3/2)) + (2*(19*a^2*b*B + 8*b^3*B + 63*a^3*C - 14*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d*Sqrt[Cos[c + d*x]])}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 9, ((a + b)*(24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(192*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((56*a^2*b*B - 208*a*b^2*B + 3*a^3*C - 114*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(96*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*a^3*b*B - 96*a*b^3*B - 3*a^4*C - 24*a^2*b^2*C - 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((56*a*b*B + 3*a^2*C + 36*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b*d) + ((8*b*B + 3*a*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + ((24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b^2*d)}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 8, ((a + b)*(30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((24*a^2*B - 6*a*b*B + 12*b^2*B - 7*a^2*C + 26*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((2*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b*d)}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 8, ((a + b)*(4*b*B + 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*B - 8*a*b*B - 4*a^2*C + a*b*C - 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*d)}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 8, -(((a + b)*(2*a*B - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*B + 2*a*b*B - b^2*B + a^2*C - 2*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*b*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((2*a*B - b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/d}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 8, (-2*(a + b)*(4*b*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*B + 4*a*b*B + 3*b^2*B + 3*a^2*C + 6*a*b*C - 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(4*b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 7, (-2*(a + b)*(9*a^2*B + 3*b^2*B + 20*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*B + 12*a*b*B + 3*b^2*B + 5*a^2*C + 20*a*b*C + 15*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(6*b*B + 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*B + 3*b^2*B + 20*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*a*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(a + b)*(82*a^2*b*B - 6*b^3*B + 63*a^3*C + 21*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*B + 82*a^2*b*B + 51*a*b^2*B - 6*b^3*B + 63*a^3*C + 84*a^2*b*C + 21*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(8*b*B + 7*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*B + 3*b^2*B + 42*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a*d*Cos[c + d*x]^(3/2)) + (2*(82*a^2*b*B - 6*b^3*B + 63*a^3*C + 21*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(105*a^2*d*Sqrt[Cos[c + d*x]])}


{Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2), x, 10, ((a + b)*(150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((590*a^3*b*B - 3220*a^2*b^2*B + 360*a*b^3*B - 720*b^4*B + 15*a^4*C - 1146*a^3*b*C + 772*a^2*b^2*C - 2312*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((10*a^4*b*B - 240*a^2*b^3*B - 96*b^5*B - 3*a^5*C - 40*a^3*b^2*C - 240*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((590*a^2*b*B + 360*b^3*B + 15*a^3*C + 772*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d) + ((110*a*b*B + 15*a^2*C + 64*b^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d) + ((2*b*B + a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(8*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d) + ((150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(1920*b^2*d)}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]], x, 9, ((a + b)*(264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((192*a^3*B - 104*a^2*b*B + 304*a*b^2*B - 59*a^3*C + 322*a^2*b*C - 36*a*b^2*C + 72*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a*b*B + 5*a^2*C + 12*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*d) + ((8*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(4*d) + ((264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b*d)}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 9, ((a + b)*(54*a*b*B + 33*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a^3*B - 72*a^2*b*B + 6*a*b^2*B - 12*b^3*B - 24*a^3*C + 13*a^2*b*C - 38*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(2*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (b*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((54*a*b*B + 33*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*d)}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(5/2), x, 9, -((a + b)*(8*a^2*B - 4*b^2*B - 9*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^3*B + 12*a^2*b*B - 12*a*b^2*B + 4*a^3*C - 12*a^2*b*C + a*b^2*C - 2*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(20*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*a*B - b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((8*a^2*B - 4*b^2*B - 9*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*d)}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(7/2), x, 9, -((a + b)*(14*a*b*B + 6*a^2*C - 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^3*B + 7*a^2*b*B + 9*a*b^2*B - 3*b^3*B + 3*a^3*C + 9*a^2*b*C - 9*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(2*b*B + 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(2*b*B + a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - ((14*a*b*B + 6*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*d)}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(9/2), x, 9, (-2*(a + b)*(9*a^2*B + 23*b^2*B + 35*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^3*B + 17*a^2*b*B + 23*a*b^2*B + 15*b^3*B + 5*a^3*C + 35*a^2*b*C + 45*a*b^2*C - 15*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^3*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(8*b*B + 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(9*a^2*B + 23*b^2*B + 35*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(11/2), x, 8, (-2*(a + b)*(145*a^2*b*B + 15*b^3*B + 63*a^3*C + 161*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*B + 145*a^2*b*B + 135*a*b^2*B + 15*b^3*B + 63*a^3*C + 119*a^2*b*C + 161*a*b^2*C + 105*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(10*b*B + 7*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*B + 45*b^2*B + 77*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(145*a^2*b*B + 15*b^3*B + 63*a^3*C + 161*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(105*a*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(13/2), x, 9, -((2*(a + b)*(147*a^4*B + 279*a^2*b^2*B - 10*b^4*B + 435*a^3*b*C + 45*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(147*a^4*B + 261*a^3*b*B + 279*a^2*b^2*B + 155*a*b^3*B - 10*b^4*B + 75*a^4*C + 435*a^3*b*C + 405*a^2*b^2*C + 45*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(4*b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2*B + 75*b^2*B + 135*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(163*a^2*b*B + 5*b^3*B + 75*a^3*C + 135*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(3/2)) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*B + 279*a^2*b^2*B - 10*b^4*B + 435*a^3*b*C + 45*a*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d*Sqrt[Cos[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d*x]^(15/2), x, 10, -((2*(a + b)*(3705*a^4*b*B + 255*a^2*b^3*B + 40*b^5*B + 1617*a^5*C + 3069*a^3*b^2*C - 110*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3465*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(675*a^5*B + 3705*a^4*b*B + 3315*a^3*b^2*B + 255*a^2*b^3*B + 10*a*b^4*B + 40*b^5*B + 1617*a^5*C + 2871*a^4*b*C + 3069*a^3*b^2*C + 1705*a^2*b^3*C - 110*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3465*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(14*b*B + 11*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(99*d*Cos[c + d*x]^(9/2)) + (2*(81*a^2*B + 113*b^2*B + 209*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*d*Cos[c + d*x]^(7/2)) + (2*(1145*a^2*b*B + 15*b^3*B + 539*a^3*C + 825*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*a*d*Cos[c + d*x]^(5/2)) + (2*(675*a^4*B + 1025*a^2*b^2*B - 20*b^4*B + 1793*a^3*b*C + 55*a*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*a^2*d*Cos[c + d*x]^(3/2)) + (2*a*B*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(11*d*Cos[c + d*x]^(11/2)) + (2*(3705*a^4*b*B + 255*a^2*b^3*B + 40*b^5*B + 1617*a^5*C + 3069*a^3*b^2*C - 110*a*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3465*a^3*d*Sqrt[Cos[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]], x, 8, -((a + b)*(18*a*b*B - 15*a^2*C - 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(24*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*b*B - 12*b^2*B - 5*a^2*C - 2*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(12*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a^2*b*B + 8*b^3*B - 5*a^3*C - 4*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b^2*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d) - ((18*a*b*B - 15*a^2*C - 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^3*d)}
{(Sqrt[Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]], x, 7, ((a + b)*(4*b*B - 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((a - 2*b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*b*B - 3*a^2*C - 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d) + ((4*b*B - 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^2*d)}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]), x, 6, ((a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b*d)}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]), x, 4, (2*(B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]), x, 5, (-2*(a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(B + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(a*d*Sqrt[Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*Sqrt[a + b*Cos[c + d*x]]), x, 6, (2*(a + b)*(2*b*B - 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*B - 2*b*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(2*b*B - 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^2*d*Sqrt[Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(9/2)*Sqrt[a + b*Cos[c + d*x]]), x, 7, (-2*(a + b)*(9*a^2*B + 8*b^2*B - 10*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(9*a^2*B + 2*a*b*B + 8*b^2*B + 5*a^2*C - 10*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*(4*b*B - 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*B + 8*b^2*B - 10*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(15*a^3*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2), x, 8, ((12*a^2*b*B - 4*b^3*B - 15*a^3*C + 7*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(4*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*b*B - 5*a^2*C + 3*a*b*C - 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*(a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((12*a*b*B - 15*a^2*C - 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(2*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*b*B - 5*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) + ((12*a^2*b*B - 4*b^3*B - 15*a^3*C + 7*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^3*(a^2 - b^2)*d)}
{(Sqrt[Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2), x, 7, -(((2*a*b*B - 3*a^2*C + b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((2*a*b*B - 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d)}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)), x, 6, (2*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Tan[(c + d*x)/2])/(b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)), x, 5, (-2*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(3/2)), x, 6, (-2*(a^2*B - 2*b^2*B + a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*B - 2*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + (2*(a^2*B - 2*b^2*B + a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Cos[c + d*x])^(3/2)), x, 7, (2*(5*a^2*b*B - 8*b^3*B - 3*a^3*C + 6*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*B - 6*a*b*B + 8*b^2*B + 3*a^2*C - 6*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)) + (2*(a^2*B - 4*b^2*B + 3*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (2*(5*a^2*b*B - 8*b^3*B - 3*a^3*C + 6*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(3/2)*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(5/2), x, 8, -((6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*a^2*b*B - 3*a*b^2*B - 3*b^3*B - 5*a^3*C + 3*a^2*b*C + 6*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*a*(2*a^2*b*B - 6*b^3*B - 5*a^3*C + 9*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d)}
{(Sqrt[Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(5/2), x, 7, (-2*(4*b^3*B + 3*a^3*C - 7*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*b*B + 3*b^2*B + 2*a^2*C - 3*a*b*C - 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(4*b^3*B + 3*a^3*C - 7*a*b^2*C)*Sqrt[Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)), x, 5, (2*(3*a^2*B + b^2*B - 4*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*B + b*B - a*C - 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(3*a^2*B + b^2*B - 4*a*b*C)*Sqrt[Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2)), x, 6, (-2*(6*a^2*b*B - 2*b^3*B - 3*a^3*C - a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*B + 3*a*b*B - 2*b^2*B - 3*a^2*C - a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/(3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)) - (2*(5*a^2*b*B - b^3*B - 2*a^3*C - 2*a*b^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(6*a^2*b*B - 2*b^3*B - 3*a^3*C - a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^(5/2)), x, 7, (-2*(3*a^4*B - 15*a^2*b^2*B + 8*b^4*B + 6*a^3*b*C - 2*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^3*B - 9*a^2*b*B - 6*a*b^2*B + 8*b^3*B + 3*a^3*C + 3*a^2*b*C - 2*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - a*C)*Sin[c + d*x])/(3*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)) - (2*(7*a^2*b*B - 3*b^3*B - 4*a^3*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(8*a^2*b*B - 4*b^3*B - 5*a^3*C + a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) + (2*(3*a^4*B - 15*a^2*b^2*B + 8*b^4*B + 6*a^3*b*C - 2*a*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/3)*)
(**)


{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x, 2, Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x]}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x, 2, Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x]}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x, 1, Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x]}
{(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x, 1, Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x]}


(* ::Subsection:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsection:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Section:: *)
(*Cos[c+d x]^m (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, (1/8)*(4*a*A + 3*b*B + 3*a*C)*x + (2*(5*A*b + 5*a*B + 4*b*C)*Sin[c + d*x])/(15*d) + ((4*a*A + 3*b*B + 3*a*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((5*A*b + 5*a*B + 4*b*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + ((5*b*B + a*C)*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, (1/8)*(4*A*b + 4*a*B + 3*b*C)*x + ((3*a*A + 2*b*B + 2*a*C)*Sin[c + d*x])/(3*d) + ((4*A*b + 4*a*B + 3*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*b*B + a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 3, (1/2)*(2*a*A + b*B + a*C)*x + ((3*A*b^2 + 3*a*b*B - a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b*d) + ((3*b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, ((2*A*b + 2*a*B + b*C)*x)/2 + (a*A*ArcTanh[Sin[c + d*x]])/d + ((2*b*B + a*C)*Sin[c + d*x])/(2*d) + (C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, (b*B + a*C)*x + ((A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(A - C)*Sin[c + d*x])/d + (A*(a + b*Cos[c + d*x])*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 4, b*C*x + ((a*A + 2*b*B + 2*a*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((A*b + 2*a*B)*Tan[c + d*x])/(2*d) + (A*(b + a*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, ((A*b + a*B + 2*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a*A + 3*b*B + 3*a*C)*Tan[c + d*x])/(3*d) + ((A*b + 3*a*B)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 6, ((3*a*A + 4*b*B + 4*a*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((2*A*b + 2*a*B + 3*b*C)*Tan[c + d*x])/(3*d) + ((3*a*A + 4*b*B + 4*a*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((A*b + 4*a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 7, ((3*A*b + 3*a*B + 4*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(4*a*A + 5*b*B + 5*a*C)*Tan[c + d*x])/(15*d) + ((3*A*b + 3*a*B + 4*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((4*a*A + 5*b*B + 5*a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + ((A*b + 5*a*B)*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (A*(a + b*Cos[c + d*x])*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, (1/8)*(8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*x + ((15*a^2*A + 10*A*b^2 + 20*a*b*B + 10*a^2*C + 8*b^2*C)*Sin[c + d*x])/(15*d) + ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((20*A*b^2 + 25*a*b*B + 2*a^2*C + 16*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(60*d) + ((5*b*B + 2*a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(20*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(8*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C + 3*b^2*C)*x + ((12*a*A*b^2 + 4*a^2*b*B + 4*b^3*B - a^3*C + 8*a*b^2*C)*Sin[c + d*x])/(6*b*d) + ((12*A*b^2 + 8*a*b*B - 2*a^2*C + 9*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + ((4*b*B - a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*b*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, ((4*a*A*b + 2*a^2*B + b^2*B + 2*a*b*C)*x)/2 + (a^2*A*ArcTanh[Sin[c + d*x]])/d + ((6*A*b^2 + 9*a*b*B + 2*a^2*C + 4*b^2*C)*Sin[c + d*x])/(6*d) + ((3*b*B + 2*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, ((2*A*b^2 + 4*a*b*B + 2*a^2*C + b^2*C)*x)/2 + (a*(2*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(2*a*A - 2*b*B - 3*a*C)*Sin[c + d*x])/(2*d) - (b*(2*A - C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, (b^2*B + 2*a*b*C)*x + ((a^2*A + 2*A*b^2 + 4*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(3*A*b + 2*a*B - 2*b*C)*Sin[c + d*x])/(2*d) + ((A*b + a*B)*(a + b*Cos[c + d*x])*Tan[c + d*x])/d + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 5, b^2*C*x + ((2*a*A*b + a^2*B + 2*b^2*B + 4*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((4*a^2*A + 2*A*b^2 + 9*a*b*B + 6*a^2*C)*Tan[c + d*x])/(6*d) + ((2*A*b + 3*a*B)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (A*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, ((3*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C + 8*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((4*a*A*b + 2*a^2*B + 3*b^2*B + 6*a*b*C)*Tan[c + d*x])/(3*d) + ((9*a^2*A + 2*A*b^2 + 16*a*b*B + 12*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((A*b + 2*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(6*d) + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 7, ((6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((8*a^2*A + 10*A*b^2 + 20*a*b*B + 10*a^2*C + 15*b^2*C)*Tan[c + d*x])/(15*d) + ((6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((16*a^2*A + 2*A*b^2 + 25*a*b*B + 20*a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + ((2*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (1/16)*(24*a^2*A*b + 6*A*b^3 + 8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*x + ((15*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 10*a^3*C + 24*a*b^2*C)*Sin[c + d*x])/(15*d) + ((24*a^2*A*b + 6*A*b^3 + 8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((90*a*A*b^2 + 54*a^2*b*B + 32*b^3*B + 2*a^3*C + 71*a*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(120*d) + ((30*A*b^2 + 42*a*b*B + 6*a^2*C + 25*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(120*d) + ((2*b*B + a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(10*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*(8*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*x + ((80*a^2*A*b^2 + 20*A*b^4 + 15*a^3*b*B + 60*a*b^3*B - 3*a^4*C + 52*a^2*b^2*C + 16*b^4*C)*Sin[c + d*x])/(30*b*d) + ((100*a*A*b^2 + 30*a^2*b*B + 45*b^3*B - 6*a^3*C + 71*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((20*A*b^2 + 15*a*b*B - 3*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*b*d) + ((5*b*B - a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*b*d) + (C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, ((24*a^2*A*b + 4*A*b^3 + 8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*x)/8 + (a^3*A*ArcTanh[Sin[c + d*x]])/d + ((60*a*A*b^2 + 44*a^2*b*B + 16*b^3*B + 6*a^3*C + 39*a*b^2*C)*Sin[c + d*x])/(24*d) + ((12*A*b^2 + 20*a*b*B + 6*a^2*C + 9*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, ((6*a*A*b^2 + 6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*C)*x)/2 + (a^2*(3*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(6*a^2*A - 6*A*b^2 - 15*a*b*B - 11*a^2*C - 4*b^2*C)*Sin[c + d*x])/(6*d) - (b*(6*a*A - 3*b*B - 5*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) - (b*(3*A - C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^3*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*x)/2 + (a*(a^2*A + 6*A*b^2 + 6*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(5*a*A*b + 2*a^2*B - 2*b^2*B - 5*a*b*C)*Sin[c + d*x])/(2*d) - (b*(4*A*b + 2*a*B - b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(2*d) + ((3*A*b + 2*a*B)*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, (b^3*B + 3*a*b^2*C)*x + ((3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B + 6*a^2*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(4*a^2*A + 11*A*b^2 + 15*a*b*B + 6*a^2*C - 6*b^2*C)*Sin[c + d*x])/(6*d) + ((2*a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C)*(a + b*Cos[c + d*x])*Tan[c + d*x])/(3*d) + ((A*b + a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 6, b^3*C*x + ((3*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 8*b^3*B + 4*a^3*C + 24*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((39*a^2*A*b + 6*A*b^3 + 16*a^3*B + 44*a*b^2*B + 60*a^2*b*C)*Tan[c + d*x])/(24*d) + ((9*a^2*A + 6*A*b^2 + 20*a*b*B + 12*a^2*C)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(24*d) + ((3*A*b + 4*a*B)*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (A*(b + a*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, ((9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 8*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((8*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 15*b^3*B + 10*a^3*C + 45*a*b^2*C)*Tan[c + d*x])/(15*d) + ((103*a^2*A*b + 6*A*b^3 + 45*a^3*B + 90*a*b^2*B + 140*a^2*b*C)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((8*a^2*A + 3*A*b^2 + 15*a*b*B + 10*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(30*d) + ((3*A*b + 5*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 8, ((5*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 8*b^3*B + 6*a^3*C + 24*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((24*a^2*A*b + 10*A*b^3 + 8*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 15*b^3*C)*Tan[c + d*x])/(15*d) + ((5*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 8*b^3*B + 6*a^3*C + 24*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + ((71*a^2*A*b + 2*A*b^3 + 32*a^3*B + 54*a*b^2*B + 90*a^2*b*C)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + ((25*a^2*A + 6*A*b^2 + 42*a*b*B + 30*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + ((A*b + 2*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(10*d) + (A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}


{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, (1/16)*(32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B + 24*a^3*b*C + 20*a*b^3*C)*x + ((105*a^4*A + 420*a^2*A*b^2 + 56*A*b^4 + 280*a^3*b*B + 224*a*b^3*B + 70*a^4*C + 336*a^2*b^2*C + 48*b^4*C)*Sin[c + d*x])/(105*d) + ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B + 24*a^3*b*C + 20*a*b^3*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((1008*a^2*A*b^2 + 224*A*b^4 + 392*a^3*b*B + 721*a*b^3*B + 8*a^4*C + 788*a^2*b^2*C + 192*b^4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(840*d) + ((504*a*A*b^2 + 336*a^2*b*B + 175*b^3*B + 24*a^3*C + 412*a*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])*Sin[c + d*x])/(840*d) + ((14*A*b^2 + 21*a*b*B + 4*a^2*C + 12*b^2*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(70*d) + ((7*b*B + 4*a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(42*d) + (C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 6, (1/16)*(16*a^4*A + 48*a^2*A*b^2 + 6*A*b^4 + 32*a^3*b*B + 24*a*b^3*B + 8*a^4*C + 36*a^2*b^2*C + 5*b^4*C)*x + ((190*a^3*A*b^2 + 160*a*A*b^4 + 24*a^4*b*B + 224*a^2*b^3*B + 32*b^5*B - 4*a^5*C + 121*a^3*b^2*C + 128*a*b^4*C)*Sin[c + d*x])/(60*b*d) + ((260*a^2*A*b^2 + 90*A*b^4 + 48*a^3*b*B + 232*a*b^3*B - 8*a^4*C + 178*a^2*b^2*C + 75*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(240*d) + ((70*a*A*b^2 + 24*a^2*b*B + 32*b^3*B - 4*a^3*C + 53*a*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(120*b*d) + ((30*A*b^2 + 24*a*b*B - 4*a^2*C + 25*b^2*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(120*b*d) + ((6*b*B - a*C)*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(30*b*d) + (C*(a + b*Cos[c + d*x])^5*Sin[c + d*x])/(6*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, ((32*a^3*A*b + 16*a*A*b^3 + 8*a^4*B + 24*a^2*b^2*B + 3*b^4*B + 16*a^3*b*C + 12*a*b^3*C)*x)/8 + (a^4*A*ArcTanh[Sin[c + d*x]])/d + ((520*a^2*A*b^2 + 80*A*b^4 + 250*a^3*b*B + 275*a*b^3*B + 24*a^4*C + 332*a^2*b^2*C + 64*b^4*C)*Sin[c + d*x])/(120*d) + ((160*a*A*b^2 + 130*a^2*b*B + 45*b^3*B + 24*a^3*C + 116*a*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(120*d) + ((20*A*b^2 + 35*a*b*B + 12*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*d) + ((5*b*B + 4*a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*d) + (C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, ((48*a^2*A*b^2 + 4*A*b^4 + 32*a^3*b*B + 16*a*b^3*B + 8*a^4*C + 24*a^2*b^2*C + 3*b^4*C)*x)/8 + (a^3*(4*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(24*a^3*A - 84*a*A*b^2 - 104*a^2*b*B - 16*b^3*B - 50*a^3*C - 55*a*b^2*C)*Sin[c + d*x])/(24*d) - (b*(24*a^2*A - 12*A*b^2 - 32*a*b*B - 26*a^2*C - 9*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(24*d) - (b*(12*a*A - 4*b*B - 7*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) - (b*(4*A - C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^4*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, (b*(8*a*A*b^2 + 12*a^2*b*B + b^3*B + 8*a^3*C + 4*a*b^2*C)*x)/2 + (a^2*(a^2*A + 12*A*b^2 + 8*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(21*a^2*A*b - 6*A*b^3 + 6*a^3*B - 21*a*b^2*B - 26*a^2*b*C - 4*b^3*C)*Sin[c + d*x])/(6*d) - (b*(18*a*A*b + 6*a^2*B - 3*b^2*B - 8*a*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) - (b*(15*A*b + 6*a*B - 2*b*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(6*d) + ((2*A*b + a*B)*(a + b*Cos[c + d*x])^3*Tan[c + d*x])/d + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, (b^2*(2*A*b^2 + 8*a*b*B + 12*a^2*C + b^2*C)*x)/2 + (a*(4*a^2*A*b + 8*A*b^3 + a^3*B + 12*a*b^2*B + 8*a^2*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) - (b*(4*a^3*A + 26*a*A*b^2 + 21*a^2*b*B - 6*b^3*B + 6*a^3*C - 21*a*b^2*C)*Sin[c + d*x])/(6*d) - (b*(4*a^2*A + 18*A*b^2 + 18*a*b*B + 6*a^2*C - 3*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(6*d) + ((4*a^2*A + 12*A*b^2 + 15*a*b*B + 6*a^2*C)*(a + b*Cos[c + d*x])^2*Tan[c + d*x])/(6*d) + ((4*A*b + 3*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, (b^4*B + 4*a*b^3*C)*x + ((3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B + 4*a^4*C + 48*a^2*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) - (b*(55*a^2*A*b + 50*A*b^3 + 16*a^3*B + 104*a*b^2*B + 84*a^2*b*C - 24*b^3*C)*Sin[c + d*x])/(24*d) + ((23*a^2*A*b + 12*A*b^3 + 8*a^3*B + 36*a*b^2*B + 36*a^2*b*C)*(a + b*Cos[c + d*x])*Tan[c + d*x])/(12*d) + ((3*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((A*b + a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 7, b^4*C*x + ((12*a^3*A*b + 16*a*A*b^3 + 3*a^4*B + 24*a^2*b^2*B + 8*b^4*B + 16*a^3*b*C + 32*a*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((64*a^4*A + 332*a^2*A*b^2 + 24*A*b^4 + 275*a^3*b*B + 250*a*b^3*B + 80*a^4*C + 520*a^2*b^2*C)*Tan[c + d*x])/(120*d) + ((116*a^2*A*b + 24*A*b^3 + 45*a^3*B + 130*a*b^2*B + 160*a^2*b*C)*(b + a*Sec[c + d*x])*Tan[c + d*x])/(120*d) + ((16*a^2*A + 12*A*b^2 + 35*a*b*B + 20*a^2*C)*(b + a*Sec[c + d*x])^2*Tan[c + d*x])/(60*d) + ((4*A*b + 5*a*B)*(b + a*Sec[c + d*x])^3*Tan[c + d*x])/(20*d) + (A*(b + a*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^7*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B + 6*a^4*C + 48*a^2*b^2*C + 16*b^4*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((32*a^3*A*b + 40*a*A*b^3 + 8*a^4*B + 60*a^2*b^2*B + 15*b^4*B + 40*a^3*b*C + 60*a*b^3*C)*Tan[c + d*x])/(15*d) + ((75*a^4*A + 334*a^2*A*b^2 + 8*A*b^4 + 296*a^3*b*B + 192*a*b^3*B + 90*a^4*C + 460*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(240*d) + ((39*a^2*A*b + 4*A*b^3 + 16*a^3*B + 36*a*b^2*B + 50*a^2*b*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + ((25*a^2*A + 12*A*b^2 + 48*a*b*B + 30*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + ((2*A*b + 3*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^4*Tan[c + d*x])/(15*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^8*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 9, ((20*a^3*A*b + 24*a*A*b^3 + 5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 24*a^3*b*C + 32*a*b^3*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((48*a^4*A + 336*a^2*A*b^2 + 70*A*b^4 + 224*a^3*b*B + 280*a*b^3*B + 56*a^4*C + 420*a^2*b^2*C + 105*b^4*C)*Tan[c + d*x])/(105*d) + ((20*a^3*A*b + 24*a*A*b^3 + 5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 24*a^3*b*C + 32*a*b^3*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + ((192*a^4*A + 788*a^2*A*b^2 + 8*A*b^4 + 721*a^3*b*B + 392*a*b^3*B + 224*a^4*C + 1008*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(840*d) + ((412*a^2*A*b + 24*A*b^3 + 175*a^3*B + 336*a*b^2*B + 504*a^2*b*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^3*Tan[c + d*x])/(840*d) + ((12*a^2*A + 4*A*b^2 + 21*a*b*B + 14*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(70*d) + ((4*A*b + 7*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^5*Tan[c + d*x])/(42*d) + (A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^6*Tan[c + d*x])/(7*d)}


{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 5, (1/8)*(8*a^4*b*B + 24*a^2*b^3*B + 3*b^5*B - 8*a^5*C - 8*a^3*b^2*C + 9*a*b^4*C)*x + (b*(95*a^3*b*B + 80*a*b^3*B - 83*a^4*C + 32*a^2*b^2*C + 16*b^4*C)*Sin[c + d*x])/(30*d) + (b^2*(130*a^2*b*B + 45*b^3*B - 106*a^3*C + 71*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + (b*(35*a*b*B - 23*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(60*d) + (b*(5*b*B - a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(20*d) + (b*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 4, (1/8)*(8*a^3*b*B + 12*a*b^3*B - 8*a^4*C + 3*b^4*C)*x + (b*(16*a^2*b*B + 4*b^3*B - 13*a^3*C + 8*a*b^2*C)*Sin[c + d*x])/(6*d) + (b^2*(20*a*b*B - 14*a^2*C + 9*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (b*(4*b*B - a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (b*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 3, (1/2)*(2*a^2*b*B + b^3*B - 2*a^3*C + a*b^2*C)*x + (2*b*(3*a*b*B - 2*a^2*C + b^2*C)*Sin[c + d*x])/(3*d) + (b^2*(3*b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (b*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, ((8*a^2*A*b^2 + 4*A*b^4 - 8*a^3*b*B - 4*a*b^3*B + 8*a^4*C + 4*a^2*b^2*C + 3*b^4*C)*x)/(8*b^5) - (2*a^3*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*Sqrt[a^2 - b^2]*d) - ((3*a*A*b^2 - 3*a^2*b*B - 2*b^3*B + 3*a^3*C + 2*a*b^2*C)*Sin[c + d*x])/(3*b^4*d) + ((4*A*b^2 - 4*a*b*B + 4*a^2*C + 3*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*b^3*d) + ((b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*d) + (C*Cos[c + d*x]^3*Sin[c + d*x])/(4*b*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, -(((2*a*A*b^2 - 2*a^2*b*B - b^3*B + 2*a^3*C + a*b^2*C)*x)/(2*b^4)) + (2*a^2*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*A*b^2 - 3*a*b*B + 3*a^2*C + 2*b^2*C)*Sin[c + d*x])/(3*b^3*d) + ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*d) + (C*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, ((2*A*b^2 - 2*a*b*B + 2*a^2*C + b^2*C)*x)/(2*b^3) - (2*a*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((b*B - a*C)*Sin[c + d*x])/(b^2*d) + (C*Cos[c + d*x]*Sin[c + d*x])/(2*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 3, ((b*B - a*C)*x)/b^2 + (2*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (C*x)/b - (2*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a*b*Sqrt[a^2 - b^2]*d) + (A*ArcTanh[Sin[c + d*x]])/(a*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 4, (2*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) - ((A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^2*d) + (A*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, (-2*b*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) + ((a^2*A + 2*A*b^2 - 2*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^3*d) - ((A*b - a*B)*Tan[c + d*x])/(a^2*d) + (A*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*b^2*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) - ((a^2*A*b + 2*A*b^3 - a^3*B - 2*a*b^2*B + 2*a^2*b*C)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) + ((2*a^2*A + 3*A*b^2 - 3*a*b*B + 3*a^2*C)*Tan[c + d*x])/(3*a^3*d) - ((A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) + (A*Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 7, -((2*b^3*(A*b^2 - a*b*B + a^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*Sqrt[a^2 - b^2]*d)) + ((3*a^4*A + 4*a^2*A*b^2 + 8*A*b^4 - 4*a^3*b*B - 8*a*b^3*B + 4*a^4*C + 8*a^2*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*a^5*d) - ((2*a^2*A*b + 3*A*b^3 - 2*a^3*B - 3*a*b^2*B + 3*a^2*b*C)*Tan[c + d*x])/(3*a^4*d) + ((3*a^2*A + 4*A*b^2 - 4*a*b*B + 4*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(8*a^3*d) - ((A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*a^2*d) + (A*Sec[c + d*x]^3*Tan[c + d*x])/(4*a*d)}


{Cos[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, -(((4*a*A*b^2 - 6*a^2*b*B - b^3*B + 8*a^3*C + 2*a*b^2*C)*x)/(2*b^5)) + (2*a^2*(2*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 4*a*b^3*B + 4*a^4*C - 5*a^2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(3/2)*d) + ((6*a^2*A*b^2 - 3*A*b^4 - 9*a^3*b*B + 6*a*b^3*B + 12*a^4*C - 7*a^2*b^2*C - 2*b^4*C)*Sin[c + d*x])/(3*b^4*(a^2 - b^2)*d) - ((2*a*A*b^2 - 3*a^2*b*B + b^3*B + 4*a^3*C - 2*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 4*a^2*C - b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, ((2*A*b^2 - 4*a*b*B + 6*a^2*C + b^2*C)*x)/(2*b^4) - (2*a*(a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 4*a^2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - ((a*A*b^2 - 2*a^2*b*B + b^3*B + 3*a^3*C - 2*a*b^2*C)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 4, ((b*B - 2*a*C)*x)/b^3 - (2*(A*b^4 + a^3*b*B - 2*a*b^3*B - 2*a^4*C + 3*a^2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((A*b^2 - a*b*B + 2*a^2*C - b^2*C)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, (C*x)/b^2 + (2*(a*A*b^2 - b^3*B - a^3*C + 2*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 4, (-2*(2*a^2*A*b - A*b^3 - a^3*B + a^2*b*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + (A*ArcTanh[Sin[c + d*x]])/(a^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 5, (2*(3*a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + a*b^3*B + a^4*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) - ((2*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, (-2*b*(4*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 2*a*b^3*B + 2*a^4*C - a^2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) + ((a^2*A + 6*A*b^2 - 4*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^4*d) - ((2*a^2*A*b - 3*A*b^3 - a^3*B + 2*a*b^2*B - a^2*b*C)*Tan[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 7, (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 - 4*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 2*a^2*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) - ((2*a^2*A*b + 8*A*b^3 - a^3*B - 6*a*b^2*B + 4*a^2*b*C)*ArcTanh[Sin[c + d*x]])/(2*a^5*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 - 6*a^3*b*B + 9*a*b^3*B + 3*a^4*C - 6*a^2*b^2*C)*Tan[c + d*x])/(3*a^4*(a^2 - b^2)*d) - ((2*a^2*A*b - 4*A*b^3 - a^3*B + 3*a*b^2*B - 2*a^2*b*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, ((2*A*b^2 - 6*a*b*B + 12*a^2*C + b^2*C)*x)/(2*b^5) - (a*(2*a^4*A*b^2 - 5*a^2*A*b^4 + 6*A*b^6 - 6*a^5*b*B + 15*a^3*b^3*B - 12*a*b^5*B + 12*a^6*C - 29*a^4*b^2*C + 20*a^2*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) - ((2*a^3*A*b^2 - 5*a*A*b^4 - 6*a^4*b*B + 11*a^2*b^3*B - 2*b^5*B + 12*a^5*C - 21*a^3*b^2*C + 6*a*b^4*C)*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) + ((a^2*A*b^2 - 4*A*b^4 - 3*a^3*b*B + 6*a*b^3*B + 6*a^4*C - 10*a^2*b^2*C + b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((3*A*b^4 + 2*a^3*b*B - 5*a*b^3*B - 4*a^4*C + 7*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 5, ((b*B - 3*a*C)*x)/b^4 + ((a^2*A*b^4 + 2*A*b^6 - 2*a^5*b*B + 5*a^3*b^3*B - 6*a*b^5*B + 6*a^6*C - 15*a^4*b^2*C + 12*a^2*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b^4 + 2*a^3*b*B - 5*a*b^3*B - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b^2 + 2*A*b^4 + a^3*b*B - 4*a*b^3*B - 3*a^4*C + 6*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, (C*x)/b^3 - ((3*a*A*b^4 - a^2*b^3*B - 2*b^5*B + 2*a^5*C - 5*a^3*b^2*C + 6*a*b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((2*a^2*A*b^2 + A*b^4 - 3*a*b^3*B - 2*a^4*C + 5*a^2*b^2*C)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, ((2*a^2*A + A*b^2 - 3*a*b*B + a^2*C + 2*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((3*a*A*b^2 - a^2*b*B - 2*b^3*B - a^3*C + 4*a*b^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 5, -(((6*a^4*A*b - 5*a^2*A*b^3 + 2*A*b^5 - 2*a^5*B - a^3*b^2*B + 3*a^4*b*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((5*a^2*A*b^2 - 2*A*b^4 - 3*a^3*b*B + a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 6, ((12*a^4*A*b^2 - 15*a^2*A*b^4 + 6*A*b^6 - 6*a^5*b*B + 5*a^3*b^3*B - 2*a*b^5*B + 2*a^6*C + a^4*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 + 5*a^3*b*B - 2*a*b^3*B - 3*a^4*C)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((6*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a*b^3*B + 2*a^4*C + a^2*b^2*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, -((b*(20*a^4*A*b^2 - 29*a^2*A*b^4 + 12*A*b^6 - 12*a^5*b*B + 15*a^3*b^3*B - 6*a*b^5*B + 6*a^6*C - 5*a^4*b^2*C + 2*a^2*b^4*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d)) + ((a^2*A + 12*A*b^2 - 6*a*b*B + 2*a^2*C)*ArcTanh[Sin[c + d*x]])/(2*a^5*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B - 5*a^4*b*C + 2*a^2*b^3*C)*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B - 4*a^4*C + a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((7*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + 2*a*b^3*B + 3*a^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}


(* {Cos[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 7, ((2*A*b^2 - 8*a*b*B + 20*a^2*C + b^2*C)*x)/(2*b^6) - (a*(2*a^6*A*b^2 - 7*a^4*A*b^4 + 8*a^2*A*b^6 - 8*A*b^8 - 8*a^7*b*B + 28*a^5*b^3*B - 35*a^3*b^5*B + 20*a*b^7*B + 20*a^8*C - 69*a^6*b^2*C + 84*a^4*b^4*C - 40*a^2*b^6*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^6*(a^2 - b^2)^(7/2)*d) - ((6*a^5*A*b^2 - 17*a^3*A*b^4 + 26*a*A*b^6 - 24*a^6*b*B + 68*a^4*b^3*B - 65*a^2*b^5*B + 6*b^7*B + 60*a^7*C - 167*a^5*b^2*C + 146*a^3*b^4*C - 24*a*b^6*C)*Sin[c + d*x])/(6*b^5*(a^2 - b^2)^3*d) + ((a^4*A*b^2 - 2*a^2*A*b^4 + 6*A*b^6 - 4*a^5*b*B + 11*a^3*b^3*B - 12*a*b^5*B + 10*a^6*C - 27*a^4*b^2*C + 23*a^2*b^4*C - b^6*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^4*(a^2 - b^2)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^4*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((a^2*A*b^2 + 4*A*b^4 + 2*a^3*b*B - 7*a*b^3*B - 5*a^4*C + 10*a^2*b^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((2*a^4*A*b^2 + a^2*A*b^4 + 12*A*b^6 - 8*a^5*b*B + 20*a^3*b^3*B - 27*a*b^5*B + 20*a^6*C - 53*a^4*b^2*C + 48*a^2*b^4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))} *)
{Cos[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 6, ((b*B - 4*a*C)*x)/b^5 - ((3*a^2*A*b^6 + 2*A*b^8 + 2*a^7*b*B - 7*a^5*b^3*B + 8*a^3*b^5*B - 8*a*b^7*B - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + 20*a^2*b^6*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((4*a^2*A*b^4 + 11*A*b^6 - 6*a^5*b*B + 17*a^3*b^3*B - 26*a*b^5*B + 24*a^6*C - 68*a^4*b^2*C + 65*a^2*b^4*C - 6*b^6*C)*Sin[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((2*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 6*a*b^3*B - 4*a^4*C + 9*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((3*a^2*A*b^4 + 2*A*b^6 - a^5*b*B + 2*a^3*b^3*B - 6*a*b^5*B + 4*a^6*C - 11*a^4*b^2*C + 12*a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, (C*x)/b^4 + ((a^3*A*b^4 + 4*a*A*b^6 - 3*a^2*b^5*B - 2*b^7*B - 2*a^7*C + 7*a^5*b^2*C - 8*a^3*b^4*C + 8*a*b^6*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((3*a^2*A*b^2 + 2*A*b^4 - 5*a*b^3*B - 3*a^4*C + 8*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((13*a^2*A*b^4 + 2*A*b^6 - 4*a^3*b^3*B - 11*a*b^5*B + 6*a^6*C - 17*a^4*b^2*C + 26*a^2*b^4*C)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, -(((4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B + 3*a^2*b*C + 2*b^3*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((4*a^2*A*b^2 + A*b^4 - a^3*b*B - 4*a*b^3*B - 2*a^4*C + 7*a^2*b^2*C)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((2*a^3*A*b^2 + 13*a*A*b^4 + a^4*b*B - 10*a^2*b^3*B - 6*b^5*B + 2*a^5*C - 5*a^3*b^2*C + 18*a*b^4*C)*Sin[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, ((2*a^3*A + 3*a*A*b^2 - 4*a^2*b*B - b^3*B + a^3*C + 4*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - ((5*a*A*b^2 - 2*a^2*b*B - 3*b^3*B - a^3*C + 6*a*b^2*C)*Sin[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - ((11*a^2*A*b^2 + 4*A*b^4 - 2*a^3*b*B - 13*a*b^3*B - a^4*C + 10*a^2*b^2*C + 6*b^4*C)*Sin[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 6, -(((8*a^6*A*b - 8*a^4*A*b^3 + 7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B + 4*a^6*b*C + a^4*b^3*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d)) + (A*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((8*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B + 2*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((26*a^4*A*b^2 - 17*a^2*A*b^4 + 6*A*b^6 - 11*a^5*b*B - 4*a^3*b^3*B + 2*a^6*C + 13*a^4*b^2*C)*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 7, ((20*a^6*A*b^2 - 35*a^4*A*b^4 + 28*a^2*A*b^6 - 8*A*b^8 - 8*a^7*b*B + 8*a^5*b^3*B - 7*a^3*b^5*B + 2*a*b^7*B + 2*a^8*C + 3*a^6*b^2*C)*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) - ((4*A*b - a*B)*ArcTanh[Sin[c + d*x]])/(a^5*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 + 26*a^5*b*B - 17*a^3*b^3*B + 6*a*b^5*B - 11*a^6*C - 4*a^4*b^2*C)*Tan[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + ((9*a^2*A*b^2 - 4*A*b^4 - 6*a^3*b*B + a*b^3*B + 3*a^4*C + 2*a^2*b^2*C)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((12*a^4*A*b^2 - 11*a^2*A*b^4 + 4*A*b^6 - 6*a^5*b*B + 2*a^3*b^3*B - a*b^5*B + 2*a^6*C + 3*a^4*b^2*C)*Tan[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 8, ((6*a^2*b*(a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B - 6*a^6*C + 2*a^4*b^2*C - a^2*b^4*C) - 6*b*(a^8*A + 17*a^6*A*b^2 - 57*a^4*A*b^4 + 59*a^2*A*b^6 - 20*A*b^8 - 8*a^7*b*B + 24*a^5*b^3*B - 24*a^3*b^5*B + 8*a*b^7*B + 2*a^8*C - 6*a^6*b^2*C + 6*a^4*b^4*C - 2*a^2*b^6*C))*ArcTan[((a - b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(6*a^6*(a^2 - b^2)^(7/2)*d) + ((a^8*A + 17*a^6*A*b^2 - 57*a^4*A*b^4 + 59*a^2*A*b^6 - 20*A*b^8 - 8*a^7*b*B + 24*a^5*b^3*B - 24*a^3*b^5*B + 8*a*b^7*B + 2*a^8*C - 6*a^6*b^2*C + 6*a^4*b^4*C - 2*a^2*b^6*C)*ArcTanh[Sin[c + d*x]])/(2*a^6*(a^2 - b^2)^3*d) + ((-24*a^6*A*b + 146*a^4*A*b^3 - 167*a^2*A*b^5 + 60*A*b^7 + 6*a^7*B - 65*a^5*b^2*B + 68*a^3*b^4*B - 24*a*b^6*B + 26*a^6*b*C - 17*a^4*b^3*C + 6*a^2*b^5*C)*Tan[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B - 6*a^6*C + 2*a^4*b^2*C - a^2*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - ((-4*a^2*(A*b^2 - a*b*B + a^2*C) + b^2*(-3*a^2*A + 5*A*b^2 - 2*a*b*B + 2*a^2*C) + 3*a^2*b*(-(A*b) + a*B - b*C))*Sec[c + d*x]*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) + ((-2*a^2*b*(-6*a^2*A*b + A*b^3 + 3*a^3*B + 2*a*b^2*B - 5*a^2*b*C) + 2*b^2*(3*a^4*A - 18*a^2*A*b^2 + 10*A*b^4 + 9*a^3*b*B - 4*a*b^3*B - 6*a^4*C + a^2*b^2*C) + 3*a^2*(10*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + 2*a*b^3*B + 4*a^4*C + a^2*b^2*C))*Sec[c + d*x]*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}


{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 2, (b*B - a*C)*x + (b*C*Sin[c + d*x])/d}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 3, C*x + (2*(b*B - 2*a*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 4, (2*(a*b*B - a^2*C - b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) - (b*(b*B - 2*a*C)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^4, x, 5, ((2*a^2*b*B + b^3*B - 2*a^3*C - 4*a*b^2*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) - (b*(b*B - 2*a*C)*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - (b*(3*a*b*B - 4*a^2*C - 2*b^2*C)*Sin[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^5, x, 6, ((2*a^3*b*B + 3*a*b^3*B - 2*a^4*C - 7*a^2*b^2*C - b^4*C)*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - (b*(b*B - 2*a*C)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (b*(5*a*b*B - 7*a^2*C - 3*b^2*C)*Sin[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - (b*(11*a^2*b*B + 4*b^3*B - 13*a^3*C - 17*a*b^2*C)*Sin[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^m (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 9, -((2*(a + b)*(42*a^2*A*b^2 - 189*A*b^4 - 24*a^3*b*B - 57*a*b^3*B + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(42*a^3*A*b^2 - 42*a*A*b^4 - 24*a^4*b*B - 51*a^2*b^3*B + 75*b^5*B + 16*a^5*C + 20*a^3*b^2*C - 36*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(21*a*A*b^2 - 12*a^2*b*B + 75*b^3*B + 8*a^3*C + 13*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^3*d) + (2*(63*A*b^2 + 9*a*b*B - 6*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(9*b*B + a*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(63*b*d) + (2*C*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 8, (2*(a + b)*(35*a*A*b^2 - 14*a^2*b*B + 63*b^3*B + 8*a^3*C + 19*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(35*a^2*A*b^2 - 35*A*b^4 - 14*a^3*b*B + 14*a*b^3*B + 8*a^4*C + 17*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 + 7*a*b*B - 4*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^2*d) + (2*(7*b*B + a*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b*d) + (2*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(15*A*b^2 + 5*a*b*B - 2*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*b*B - 5*b^3*B - 2*a^3*C + 2*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B - 2*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 9, (2*(a + b)*(3*b*B + a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 - a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 9, -(((a + b)*(A - 2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])) + ((a*A + 2*b*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + ((A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 10, -((a + b)*(A*b + 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*A*b + 4*a*B + 8*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A - A*b^2 + 4*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((A*b + 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 11, -((a + b)*(16*a^2*A - 3*A*b^2 + 6*a*b*B + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A - A*b^2 + 18*a*b*B + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A*b + A*b^3 + 8*a^3*B - 2*a*b^2*B + 8*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A - 3*A*b^2 + 6*a*b*B + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a^2*d) + ((A*b + 6*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*a*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, -((2*(a + b)*(198*a^3*A*b^2 - 2706*a*A*b^4 - 88*a^4*b*B - 363*a^2*b^3*B - 1617*b^5*B + 48*a^5*C + 108*a^3*b^2*C - 2088*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(198*a^4*A*b^2 - 1023*a^2*A*b^4 + 825*A*b^6 - 88*a^5*b*B - 341*a^3*b^3*B + 429*a*b^5*B + 48*a^6*C + 96*a^4*b^2*C - 819*a^2*b^4*C + 675*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(99*a^2*A*b^2 + 825*A*b^4 - 44*a^3*b*B + 968*a*b^3*B + 24*a^4*C + 57*a^2*b^2*C + 675*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b^3*d) + (2*(792*a*A*b^2 + 33*a^2*b*B + 539*b^3*B - 18*a^3*C + 606*a*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b^2*d) + (2*(99*A*b^2 + 110*a*b*B + 3*a^2*C + 81*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(693*b*d) + (2*(11*b*B + 3*a*C)*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 9, (2*(a + b)*(63*a^2*A*b^2 + 189*A*b^4 - 18*a^3*b*B + 246*a*b^3*B + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(63*a^3*A*b^2 - 63*a*A*b^4 - 18*a^4*b*B + 93*a^2*b^3*B - 75*b^5*B + 8*a^5*C + 31*a^3*b^2*C - 39*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(126*a*A*b^2 + 9*a^2*b*B + 75*b^3*B - 4*a^3*C + 88*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b^2*d) + (2*(63*A*b^2 + 72*a*b*B + 3*a^2*C + 49*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(3*b*B + a*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(a + b)*(140*a*A*b^2 + 21*a^2*b*B + 63*b^3*B - 6*a^3*C + 82*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(35*a^2*A*b^2 - 35*A*b^4 + 21*a^3*b*B - 21*a*b^3*B - 6*a^4*C + 31*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 + 21*a*b*B - 6*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b*d) + (2*(7*b*B - 2*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*b*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, (2*(a + b)*(15*A*b^2 + 20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(15*a*A*b^2 - 5*a^2*b*B + 5*b^3*B - 3*a^3*C + 3*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, -((a + b)*(3*a*A - 6*b*B - 8*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2*A + 6*A*b^2 + 6*a*b*B - 2*a^2*C + 2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(3*A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*(3*A - 2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 10, -((a + b)*(5*A*b + 4*a*B - 8*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((7*a*A*b + 4*a^2*B + 8*b^2*B + 8*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 12*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*A*b + 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 11, -((a + b)*(16*a^2*A + 3*A*b^2 + 30*a*b*B + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 17*A*b^2 + 42*a*b*B + 24*a^2*C + 48*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((12*a^2*A*b - A*b^3 + 8*a^3*B + 6*a*b^2*B + 24*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 3*A*b^2 + 30*a*b*B + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a*d) + ((A*b + 2*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 12, -(((a + b)*(156*a^2*A*b - 9*A*b^3 + 128*a^3*B + 24*a*b^2*B + 240*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + ((228*a^2*A*b - 3*A*b^3 + 128*a^3*B + 136*a*b^2*B + 336*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 96*a^3*b*B - 8*a*b^3*B + 64*a^4*C + 48*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((156*a^2*A*b - 9*A*b^3 + 128*a^3*B + 24*a*b^2*B + 240*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(192*a^2*d) + ((36*a^2*A + 3*A*b^2 + 56*a*b*B + 48*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(96*a*d) + ((3*A*b + 8*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(24*d) + (A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -((2*(a + b)*(1430*a^4*A*b^2 - 39897*a^2*A*b^4 - 21021*A*b^6 - 520*a^5*b*B - 3315*a^3*b^3*B - 48165*a*b^5*B + 240*a^6*C + 760*a^4*b^2*C - 30669*a^2*b^4*C - 17787*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(45045*b^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(1430*a^5*A*b^2 - 17732*a^3*A*b^4 + 16302*a*A*b^6 - 520*a^6*b*B - 3185*a^4*b^3*B - 5070*a^2*b^5*B + 8775*b^7*B + 240*a^7*C + 700*a^5*b^2*C - 13984*a^3*b^4*C + 13044*a*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(45045*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(715*a^3*A*b^2 + 23309*a*A*b^4 - 260*a^4*b*B + 13325*a^2*b^3*B + 8775*b^5*B + 120*a^5*C + 395*a^3*b^2*C + 18973*a*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*b^3*d) + (2*(10725*a^2*A*b^2 + 7007*A*b^4 + 195*a^3*b*B + 14885*a*b^3*B - 90*a^4*C + 8145*a^2*b^2*C + 5929*b^4*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(45045*b^2*d) + (2*(2717*a*A*b^2 + 1469*a^2*b*B + 1053*b^3*B + 15*a^3*C + 2209*a*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(9009*b*d) + (2*(143*A*b^2 + 182*a*b*B + 15*a^2*C + 121*b^2*C)*Cos[c + d*x]^3*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(1287*d) + (2*(13*b*B + 5*a*C)*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(143*d) + (2*C*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(13*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 10, (2*(a + b)*(495*a^3*A*b^2 + 4785*a*A*b^4 - 110*a^4*b*B + 3069*a^2*b^3*B + 1617*b^5*B + 40*a^5*C + 255*a^3*b^2*C + 3705*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(495*a^4*A*b^2 + 330*a^2*A*b^4 - 825*A*b^6 - 110*a^5*b*B + 1364*a^3*b^3*B - 1254*a*b^5*B + 40*a^6*C + 245*a^4*b^2*C + 390*a^2*b^4*C - 675*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3465*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(1485*a^2*A*b^2 + 825*A*b^4 + 55*a^3*b*B + 1793*a*b^3*B - 20*a^4*C + 1025*a^2*b^2*C + 675*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b^2*d) + (2*(1485*a*A*b^2 + 825*a^2*b*B + 539*b^3*B + 15*a^3*C + 1145*a*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3465*b*d) + (2*(33*A*b^2 + 44*a*b*B + 5*a^2*C + 27*b^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(11*b*B + 5*a*C)*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^2*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(a + b)*(483*a^2*A*b^2 + 189*A*b^4 + 45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(168*a^3*A*b^2 - 168*a*A*b^4 + 45*a^4*b*B + 30*a^2*b^3*B - 75*b^5*B - 10*a^5*C + 124*a^3*b^2*C - 114*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(315*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(168*a*A*b^2 + 45*a^2*b*B + 75*b^3*B - 10*a^3*C + 114*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*b*d) + (2*(63*A*b^2 + 45*a*b*B - 10*a^2*C + 49*b^2*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(315*b*d) + (2*(9*b*B - 2*a*C)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(63*b*d) + (2*C*(a + b*Cos[c + d*x])^(7/2)*Sin[c + d*x])/(9*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, (2*(a + b)*(245*a*A*b^2 + 161*a^2*b*B + 63*b^3*B + 15*a^3*C + 145*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(70*a^2*A*b^2 + 35*A*b^4 - 56*a^3*b*B + 56*a*b^3*B - 15*a^4*C - 10*a^2*b^2*C + 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(105*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*a^3*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 + 56*a*b*B + 15*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(7*b*B + 5*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -((a + b)*(15*a^2*A - 30*A*b^2 - 70*a*b*B - 46*a^2*C - 18*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + ((15*a^3*A + 60*a*A*b^2 + 20*a^2*b*B + 10*b^3*B - 16*a^3*C + 16*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (a^2*(5*A*b + 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (b*(15*a*A - 10*b*B - 16*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (b*(5*A - 2*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Tan[c + d*x])/d}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -((a + b)*(27*a*A*b + 12*a^2*B - 24*b^2*B - 56*a*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((33*a^2*A*b + 24*A*b^3 + 12*a^3*B + 48*a*b^2*B + 16*a^2*b*C + 8*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 20*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(21*A*b + 12*a*B - 8*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*d) + ((5*A*b + 4*a*B)*(a + b*Cos[c + d*x])^(3/2)*Tan[c + d*x])/(4*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 11, -((a + b)*(16*a^2*A + 33*A*b^2 + 54*a*b*B + 24*a^2*C - 48*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^3*A + 59*a*A*b^2 + 66*a^2*b*B + 48*b^3*B + 24*a^3*C + 96*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*d*Sqrt[a + b*Cos[c + d*x]]) + ((20*a^2*A*b + 5*A*b^3 + 8*a^3*B + 30*a*b^2*B + 40*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 15*A*b^2 + 42*a*b*B + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*d) + ((5*A*b + 6*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]*Tan[c + d*x])/(12*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^5*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 12, -(((a + b)*(284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 432*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*a*d*Sqrt[a + b*Cos[c + d*x]])) + ((356*a^2*A*b + 133*A*b^3 + 128*a^3*B + 472*a*b^2*B + 528*a^2*b*C + 384*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(192*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 160*a^3*b*B + 40*a*b^3*B + 64*a^4*C + 240*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(64*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 432*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(192*a*d) + ((12*a^2*A + 5*A*b^2 + 24*a*b*B + 16*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(32*d) + ((5*A*b + 8*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^2*Tan[c + d*x])/(24*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^6*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 13, -(((a + b)*(1024*a^4*A + 1692*a^2*A*b^2 - 45*A*b^4 + 2840*a^3*b*B + 150*a*b^3*B + 1280*a^4*C + 2640*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(1920*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + ((1024*a^4*A + 3236*a^2*A*b^2 - 15*A*b^4 + 3560*a^3*b*B + 1330*a*b^3*B + 1280*a^4*C + 4720*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(1920*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((240*a^4*A*b + 40*a^2*A*b^3 + 3*A*b^5 + 96*a^5*B + 240*a^3*b^2*B - 10*a*b^4*B + 320*a^4*b*C + 80*a^2*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*b)/(a + b)])/(128*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((1024*a^4*A + 1692*a^2*A*b^2 - 45*A*b^4 + 2840*a^3*b*B + 150*a*b^3*B + 1280*a^4*C + 2640*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(1920*a^2*d) + ((772*a^2*A*b + 15*A*b^3 + 360*a^3*B + 590*a*b^2*B + 1040*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(960*a*d) + ((64*a^2*A + 15*A*b^2 + 110*a*b*B + 80*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(240*d) + ((A*b + 2*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^3*Tan[c + d*x])/(8*d) + (A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}


{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(a + b)*(161*a^2*b*B + 63*b^3*B - 146*a^3*C + 82*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(56*a^3*b*B - 56*a*b^3*B - 41*a^4*C + 66*a^2*b^2*C - 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(56*a*b*B - 41*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*b*(7*b*B - 2*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*b*C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(20*a*b*B - 17*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(5*a^2*b*B - 5*b^3*B - 2*a^3*C + 2*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(5*b*B - 2*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 8, -((2*(a + b)*(70*a*A*b^2 - 56*a^2*b*B - 63*b^3*B + 48*a^3*C + 44*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(70*a^2*A*b^2 + 35*A*b^4 - 56*a^3*b*B - 49*a*b^3*B + 48*a^4*C + 32*a^2*b^2*C + 25*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(105*b^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(35*A*b^2 - 28*a*b*B + 24*a^2*C + 25*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*b^3*d) + (2*(7*b*B - 6*a*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*b^2*d) + (2*C*Cos[c + d*x]^2*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(15*A*b^2 - 10*a*b*B + 8*a^2*C + 9*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(15*a*A*b^2 - 10*a^2*b*B - 5*b^3*B + 8*a^3*C + 7*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(5*b*B - 4*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^2*d) + (2*C*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*(3*b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 - 3*a*b*B + 2*a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 8, (2*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 9, -((A*(a + b)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + ((A + 2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - ((A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (A*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 10, ((a + b)*(3*A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*a*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 3*A*b^2 - 4*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*A*b - 4*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^2*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a*d)}
{Sec[c + d*x]^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 11, -((a + b)*(16*a^2*A + 15*A*b^2 - 18*a*b*B + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(24*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 5*A*b^2 - 6*a*b*B + 24*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(24*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a^2*A*b + 5*A*b^3 - 8*a^3*B - 6*a*b^2*B + 8*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(8*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*a^2*A + 15*A*b^2 - 18*a*b*B + 24*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(24*a^3*d) - ((5*A*b - 6*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(12*a^2*d) + (A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^2*Tan[c + d*x])/(3*a*d)}


{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 8, (2*(30*a^2*A*b^2 - 15*A*b^4 - 40*a^3*b*B + 25*a*b^3*B + 48*a^4*C - 24*a^2*b^2*C - 9*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(30*a*A*b^2 - 40*a^2*b*B - 5*b^3*B + 48*a^3*C + 12*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(15*a*A*b^2 - 20*a^2*b*B + 5*b^3*B + 24*a^3*C - 9*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 - 5*a*b*B + 6*a^2*C - b^2*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(3*a*A*b^2 - 6*a^2*b*B + 3*b^3*B + 8*a^3*C - 5*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*A*b^2 - 6*a*b*B + 8*a^2*C + b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b^2 - 3*a*b*B + 4*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 9, (-2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 10, -(((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(a*d*Sqrt[a + b*Cos[c + d*x]]) - ((3*A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(a^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 11, ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B - 8*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(4*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*A*b - 4*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(4*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 15*A*b^2 - 12*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a^3*d*Sqrt[a + b*Cos[c + d*x]]) - ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B - 8*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*a^3*(a^2 - b^2)*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((a^2*A - 5*A*b^2 + 4*a*b*B - 4*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)*d)}


{Cos[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 9, (2*(40*a^4*A*b^2 - 75*a^2*A*b^4 + 15*A*b^6 - 80*a^5*b*B + 140*a^3*b^3*B - 40*a*b^5*B + 128*a^6*C - 212*a^4*b^2*C + 55*a^2*b^4*C + 9*b^6*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^2*b^5*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(40*a^3*A*b^2 - 45*a*A*b^4 - 80*a^4*b*B + 80*a^2*b^3*B + 5*b^5*B + 128*a^5*C - 116*a^3*b^2*C - 17*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^5*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^3*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(2*a^2*A*b^2 - 6*A*b^4 - 5*a^3*b*B + 9*a*b^3*B + 8*a^4*C - 12*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(20*a^3*A*b^2 - 40*a*A*b^4 - 40*a^4*b*B + 65*a^2*b^3*B - 5*b^5*B + 64*a^5*C - 98*a^3*b^2*C + 14*a*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^4*(a^2 - b^2)^2*d) + (2*(15*a^2*A*b^2 - 35*A*b^4 - 30*a^3*b*B + 50*a*b^3*B + 48*a^4*C - 71*a^2*b^2*C + 3*b^4*C)*Cos[c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*(2*a^3*A*b^2 - 6*a*A*b^4 - 8*a^4*b*B + 15*a^2*b^3*B - 3*b^5*B + 16*a^5*C - 28*a^3*b^2*C + 8*a*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(2*a^2*A*b^2 - 3*A*b^4 - 8*a^3*b*B + 9*a*b^3*B + 16*a^4*C - 16*a^2*b^2*C - b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^4*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(4*A*b^4 + 3*a^3*b*B - 7*a*b^3*B - 6*a^4*C + 10*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A*b^2 - 5*A*b^4 - 4*a^3*b*B + 8*a*b^3*B + 8*a^4*C - 13*a^2*b^2*C + b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, -((2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A*b^2 + 2*a^2*b*B - 3*b^3*B - 8*a^3*C + 9*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(2*a^2*A*b^2 + 2*A*b^4 + a^3*b*B - 5*a*b^3*B - 4*a^4*C + 8*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^0*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(4*a*A*b^2 - a^2*b*B - 3*b^3*B - 2*a^3*C + 6*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B - 2*a^2*C + 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(4*a*A*b^2 - a^2*b*B - 3*b^3*B - 2*a^3*C + 6*a*b^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 10, (-2*(7*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a^4*C + 3*a^2*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*a^2*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*a*b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(7*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 11, -((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B - 8*a^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^2*A - 5*A*b^2 + 2*a*b*B - 2*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - ((5*A*b - 2*a*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(9*a^2*A*b^2 - 5*A*b^4 - 6*a^3*b*B + 2*a*b^3*B + 3*a^4*C + a^2*b^2*C)*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B - 8*a^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 12, ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B - 56*a^4*b*C + 24*a^2*b^3*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - ((27*a^2*A*b - 35*A*b^3 - 12*a^3*B + 20*a*b^2*B - 8*a^2*b*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(12*a^3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a^2*A + 35*A*b^2 - 20*a*b*B + 8*a^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(4*a^4*d*Sqrt[a + b*Cos[c + d*x]]) - ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B - 56*a^4*b*C + 24*a^2*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(12*a^4*(a^2 - b^2)^2*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(11*a^2*A*b^2 - 7*A*b^4 - 8*a^3*b*B + 4*a*b^3*B + 5*a^4*C - a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((3*a^4*A - 54*a^2*A*b^2 + 35*A*b^4 + 36*a^3*b*B - 20*a*b^3*B - 24*a^4*C + 8*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^2*d)}


{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(7/2), x, 8, (2*(23*a^2*A*b^2 + 9*A*b^4 - 3*a^3*b*B - 29*a*b^3*B - 2*a^4*C + 19*a^2*b^2*C + 15*b^4*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*(a - b)^3*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(8*a*A*b^2 - 3*a^2*b*B - 5*b^3*B - 2*a^3*C + 10*a*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(15*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(5*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(5/2)) - (2*(8*a*A*b^2 - 3*a^2*b*B - 5*b^3*B - 2*a^3*C + 10*a*b^2*C)*Sin[c + d*x])/(15*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(23*a^2*A*b^2 + 9*A*b^4 - 3*a^3*b*B - 29*a*b^3*B - 2*a^4*C + 19*a^2*b^2*C + 15*b^4*C)*Sin[c + d*x])/(15*b*(a^2 - b^2)^3*d*Sqrt[a + b*Cos[c + d*x]])}


{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, (2*(a + b)*(3*b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(a^2 - b^2)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(a + b)*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]])}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*(b*B - 2*a*C)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]])}
{(a*b*B - a^2*C + b^2*B*Cos[c + d*x] + b^2*C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(7/2), x, 8, (2*(4*a*b*B - 5*a^2*C - 3*b^2*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(b*B - 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*b)/(a + b)])/(3*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*b*(b*B - 2*a*C)*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*b*(4*a*b*B - 5*a^2*C - 3*b^2*C)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 7, (2*(9*A*b + 9*a*B + 7*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(7*a*A + 5*b*B + 5*a*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*a*A + 5*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(9*A*b + 9*a*B + 7*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(9*b*B + 2*a*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 6, (2*(5*a*A + 3*b*B + 3*a*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(7*A*b + 7*a*B + 5*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*A*b + 7*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*b*B + 2*a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, (2*(5*A*b + 5*a*B + 3*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(3*a*A + b*B + a*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(5*b*B + 2*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, -((2*(a*A - b*B - a*C)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(3*A*b + 3*a*B + b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(3*A - C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 5, -((2*(A*b + a*B - b*C)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a*A + 3*b*B + 3*a*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(2*A*b + 3*a*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 6, -((2*(3*a*A + 5*b*B + 5*a*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(A*b + a*B + 3*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(2*A*b + 5*a*B)*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(3*a*A + 5*b*B + 5*a*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x]), x, 7, -((2*(3*A*b + 3*a*B + 5*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(5*a*A + 7*b*B + 7*a*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(2*A*b + 7*a*B)*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(5*a*A + 7*b*B + 7*a*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(3*A*b + 3*a*B + 5*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 8, (2*(18*a*A*b + 9*a^2*B + 7*b^2*B + 14*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(77*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 45*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(77*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(18*a*A*b + 9*a^2*B + 7*b^2*B + 14*a*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(99*A*b^2 + 121*a*b*B + 8*a^2*C + 81*b^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (2*(11*b*B + 4*a*C)*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(5/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 7, (2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(63*A*b^2 + 81*a*b*B + 8*a^2*C + 49*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(9*b*B + 4*a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(21*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 5*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(35*A*b^2 + 49*a*b*B + 8*a^2*C + 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(7*b*B + 4*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, -((2*(5*a^2*A - 5*A*b^2 - 10*a*b*B - 5*a^2*C - 3*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(6*a*A*b + 3*a^2*B + b^2*B + 2*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(15*a*A - 5*b*B - 7*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(5*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, -((2*(2*a*A*b + a^2*B - b^2*B - 2*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C + b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(5*A*b + 3*a*B - b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*(4*A*b + 3*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 6, -((2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C - 5*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(2*a*A*b + a^2*B + 3*b^2*B + 6*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(9*a^2*A + 8*A*b^2 + 25*a*b*B + 15*a^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(4*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 7, -((2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 21*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(25*a^2*A + 8*A*b^2 + 49*a*b*B + 35*a^2*C)*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*(4*A*b + 7*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^2, x, 8, -((2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(49*a^2*A + 8*A*b^2 + 81*a*b*B + 63*a^2*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(4*A*b + 9*a*B)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}


{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 8, (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B + 9*a^3*C + 21*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(1584*a*A*b^2 + 979*a^2*b*B + 539*b^3*B + 48*a^3*C + 1212*a*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (2*(99*A*b^2 + 143*a*b*B + 24*a^2*C + 81*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(693*d) + (2*(11*b*B + 6*a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(99*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, (2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B + 7*a^3*C + 15*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(252*a*A*b^2 + 171*a^2*b*B + 75*b^3*B + 16*a^3*C + 176*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d) + (2*(3*b*B + 2*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, -((1/(5*d))*(2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B - 5*a^3*C - 9*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])) + (1/(21*d))*(2*(63*a^2*A*b + 7*A*b^3 + 21*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 5*b^3*C)*EllipticF[(1/2)*(c + d*x), 2]) - (2*b*(105*a^2*A - 35*A*b^2 - 84*a*b*B - 57*a^2*C - 25*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) - (2*b*(35*a*A - 7*b*B - 11*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d) - (2*b*(7*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, -((1/(5*d))*(2*(15*a^2*A*b - 5*A*b^3 + 5*a^3*B - 15*a*b^2*B - 15*a^2*b*C - 3*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])) + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B + 3*a^3*C + 3*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(40*a*A*b + 15*a^2*B - 5*b^2*B - 12*a*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(35*A*b + 15*a*B - 3*b*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (2*(2*A*b + a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, -((2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B + 5*a^3*C - 15*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B + 9*a^2*b*C + b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(9*a^2*A + 33*A*b^2 + 40*a*b*B + 15*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(9*a^2*A + 24*A*b^2 + 35*a*b*B + 15*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(6*A*b + 5*a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 7, -((2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B + 15*a^2*b*C - 5*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B + 7*a^3*C + 63*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(164*a^2*A*b + 48*A*b^3 + 63*a^3*B + 231*a*b^2*B + 280*a^2*b*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 + 63*a*b*B + 35*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(6*A*b + 7*a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^3, x, 8, -((2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 21*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(176*a^2*A*b + 16*A*b^3 + 75*a^3*B + 171*a*b^2*B + 252*a^2*b*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(49*a^2*A + 24*A*b^2 + 99*a*b*B + 63*a^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(2*A*b + 3*a*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}


{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 9, (2*(195*a^4*A + 702*a^2*A*b^2 + 91*A*b^4 + 468*a^3*b*B + 364*a*b^3*B + 117*a^4*C + 546*a^2*b^2*C + 77*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(195*d) + (2*(308*a^3*A*b + 220*a*A*b^3 + 77*a^4*B + 330*a^2*b^2*B + 45*b^4*B + 220*a^3*b*C + 180*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(308*a^3*A*b + 220*a*A*b^3 + 77*a^4*B + 330*a^2*b^2*B + 45*b^4*B + 220*a^3*b*C + 180*a*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(33319*a^2*A*b^2 + 7007*A*b^4 + 13351*a^3*b*B + 22763*a*b^3*B + 384*a^4*C + 25217*a^2*b^2*C + 5929*b^4*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45045*d) + (2*(3146*a*A*b^2 + 2171*a^2*b*B + 1053*b^3*B + 192*a^3*C + 2518*a*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9009*d) + (2*(143*A*b^2 + 221*a*b*B + 48*a^2*C + 121*b^2*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(1287*d) + (2*(13*b*B + 8*a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(143*d) + (2*C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(13*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, (2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 308*a^3*b*B + 220*a*b^3*B + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 2057*a^3*b*B + 2761*a*b^3*B + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3465*d) + (2*(1782*a*A*b^2 + 1353*a^2*b*B + 539*b^3*B + 192*a^3*C + 1346*a*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d) + (2*(33*A*b^2 + 55*a*b*B + 16*a^2*C + 27*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d) + (2*(11*b*B + 8*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d) + (2*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, -((2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 60*a^3*b*B - 36*a*b^3*B - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(84*a^3*A*b + 28*a*A*b^3 + 21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*C + 20*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(315*a^3*A - 357*a*A*b^2 - 423*a^2*b*B - 75*b^3*B - 187*a^3*C - 251*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) - (2*b*(315*a^2*A - 63*A*b^2 - 162*a*b*B - 123*a^2*C - 49*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d) - (2*b*(21*a*A - 3*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d) - (2*b*(9*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, -((2*(20*a^3*A*b - 20*a*A*b^3 + 5*a^4*B - 30*a^2*b^2*B - 3*b^4*B - 20*a^3*b*C - 12*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 84*a^3*b*B + 28*a*b^3*B + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(385*a^2*A*b - 35*A*b^3 + 105*a^3*B - 119*a*b^2*B - 141*a^2*b*C - 25*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) - (2*b*(350*a*A*b + 105*a^2*B - 21*b^2*B - 54*a*b*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d) - (2*b*(21*A*b + 7*a*B - b*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d) + (2*(8*A*b + 3*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, -((2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 20*a^3*b*B - 20*a*b^3*B + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(4*a^3*A*b + 12*a*A*b^3 + a^4*B + 18*a^2*b^2*B + b^4*B + 12*a^3*b*C + 4*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(9*a^3*A + 73*a*A*b^2 + 55*a^2*b*B - 5*b^3*B + 15*a^3*C - 17*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(9*a^2*A + 59*A*b^2 + 50*a*b*B + 15*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d) + (2*(3*a^2*A + 16*A*b^2 + 15*a*b*B + 5*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*(8*A*b + 5*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, -((2*(12*a^3*A*b + 20*a*A*b^3 + 3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a^3*b*C - 20*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 28*a^3*b*B + 84*a*b^3*B + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(227*a^2*A*b + 279*A*b^3 + 63*a^3*B + 511*a*b^2*B + 385*a^2*b*C - 35*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(202*a^2*A*b + 192*A*b^3 + 63*a^3*B + 413*a*b^2*B + 350*a^2*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 48*A*b^2 + 77*a*b*B + 35*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(8*A*b + 7*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2))}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 8, -((2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 36*a^3*b*B + 60*a*b^3*B + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(20*a^3*A*b + 28*a*A*b^3 + 5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a^3*b*C + 84*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(147*a^4*A + 883*a^2*A*b^2 + 128*A*b^4 + 681*a^3*b*B + 837*a*b^3*B + 189*a^4*C + 1533*a^2*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (2*(202*a^2*A*b + 64*A*b^3 + 75*a^3*B + 261*a*b^2*B + 294*a^2*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*(49*a^2*A + 48*A*b^2 + 117*a*b*B + 63*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(8*A*b + 9*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2))}
{Cos[c + d*x]^(-13/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^4, x, 9, -((2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 220*a^3*b*B + 308*a*b^3*B + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 2761*a^3*b*B + 2057*a*b^3*B + 825*a^4*C + 4653*a^2*b^2*C)*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(3/2)) + (2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(1346*a^2*A*b + 192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 1782*a^2*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(5/2)) + (2*(27*a^2*A + 16*A*b^2 + 55*a*b*B + 33*a^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d*Cos[c + d*x]^(7/2)) + (2*(8*A*b + 11*a*B)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d*Cos[c + d*x]^(9/2)) + (2*A*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d*Cos[c + d*x]^(11/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 8, -((2*(5*a*A*b^2 - 5*a^2*b*B - 3*b^3*B + 5*a^3*C + 3*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^4*d)) + (2*(21*a^2*A*b^2 + 7*A*b^4 - 21*a^3*b*B - 7*a*b^3*B + 21*a^4*C + 7*a^2*b^2*C + 5*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*b^5*d) - (2*a^3*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^5*(a + b)*d) + (2*(7*A*b^2 - 7*a*b*B + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*b^3*d) + (2*(b*B - a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*d) + (2*C*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*b*d)}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 7, (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^3*d) - (2*(3*a*A*b^2 - 3*a^2*b*B - b^3*B + 3*a^3*C + a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*d) + (2*a^2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^4*(a + b)*d) + (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*d) + (2*C*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, (2*(b*B - a*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d) + (2*(3*A*b^2 - 3*a*b*B + 3*a^2*C + b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^3*d) - (2*a*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 5, (2*C*EllipticE[(1/2)*(c + d*x), 2])/(b*d) + (2*(b*B - a*C)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*d) + (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 6, -((2*A*EllipticE[(1/2)*(c + d*x), 2])/(a*d)) + (2*C*EllipticF[(1/2)*(c + d*x), 2])/(b*d) - (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*b*(a + b)*d) + (2*A*Sin[c + d*x])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 7, (2*(A*b - a*B)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d) + (2*A*EllipticF[(1/2)*(c + d*x), 2])/(3*a*d) + (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d) + (2*A*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 8, -((2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*a^3*d)) - (2*(A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^2*d) - (2*b*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a + b)*d) + (2*A*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(3*a^2*d*Cos[c + d*x]^(3/2)) + (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*Sin[c + d*x])/(5*a^3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x]), x, 9, (2*(3*a^2*A*b + 5*A*b^3 - 3*a^3*B - 5*a*b^2*B + 5*a^2*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*a^4*d) + (2*(5*a^2*A + 7*A*b^2 - 7*a*b*B + 7*a^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*a^3*d) + (2*b^2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^4*(a + b)*d) + (2*A*Sin[c + d*x])/(7*a*d*Cos[c + d*x]^(7/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(5*a^2*d*Cos[c + d*x]^(5/2)) + (2*(5*a^2*A + 7*A*b^2 - 7*a*b*B + 7*a^2*C)*Sin[c + d*x])/(21*a^3*d*Cos[c + d*x]^(3/2)) - (2*(3*a^2*A*b + 5*A*b^3 - 3*a^3*B - 5*a*b^2*B + 5*a^2*b*C)*Sin[c + d*x])/(5*a^4*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 8, ((15*a^2*A*b^2 - 10*A*b^4 - 25*a^3*b*B + 20*a*b^3*B + 35*a^4*C - 24*a^2*b^2*C - 6*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^4*(a^2 - b^2)*d) - ((9*a^3*A*b^2 - 12*a*A*b^4 - 15*a^4*b*B + 16*a^2*b^3*B + 2*b^5*B + 21*a^5*C - 20*a^3*b^2*C - 4*a*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^5*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 7*a*b^3*B + 7*a^4*C - 9*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^5*(a + b)^2*d) - ((3*a*A*b^2 - 5*a^2*b*B + 2*b^3*B + 7*a^3*C - 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)*d) + ((5*A*b^2 - 5*a*b*B + 7*a^2*C - 2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 7, -(((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d)) + ((3*a^2*A*b^2 - 6*A*b^4 - 9*a^3*b*B + 12*a*b^3*B + 15*a^4*C - 16*a^2*b^2*C - 2*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^4*(a^2 - b^2)*d) - (a*(a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 7*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^4*(a + b)^2*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) + ((a*A*b^2 + a^2*b*B - 2*b^3*B - 3*a^3*C + 4*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d) - ((a^2*A*b^2 + A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + 5*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^3*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 6, -(((A*b^2 - a*b*B + a^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(a*b*(a^2 - b^2)*d)) - ((A*b^2 - a*b*B - a^2*C + 2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) + ((3*a^2*A*b^2 - A*b^4 - a^3*b*B - a*b^3*B - a^4*C + 3*a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 7, -(((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d)) + ((A*b^2 - a*b*B + a^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(a*b*(a^2 - b^2)*d) - ((5*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + a*b^3*B + a^4*C + a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a - b)*b*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^2, x, 8, ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^2*(a^2 - b^2)*d) + ((7*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 3*a*b^3*B + 3*a^4*C - a^2*b^2*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


{Cos[c + d*x]^(7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 9, ((75*a^4*A*b^2 - 145*a^2*A*b^4 + 40*A*b^6 - 175*a^5*b*B + 325*a^3*b^3*B - 120*a*b^5*B + 315*a^6*C - 561*a^4*b^2*C + 192*a^2*b^4*C + 24*b^6*C)*EllipticE[(1/2)*(c + d*x), 2])/(20*b^5*(a^2 - b^2)^2*d) - ((45*a^5*A*b^2 - 99*a^3*A*b^4 + 72*a*A*b^6 - 105*a^6*b*B + 223*a^4*b^3*B - 128*a^2*b^5*B - 8*b^7*B + 189*a^7*C - 387*a^5*b^2*C + 192*a^3*b^4*C + 24*a*b^6*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*b^6*(a^2 - b^2)^2*d) + (a^2*(15*a^4*A*b^2 - 38*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 86*a^3*b^3*B - 63*a*b^5*B + 63*a^6*C - 150*a^4*b^2*C + 99*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^6*(a + b)^3*d) - ((15*a^3*A*b^2 - 33*a*A*b^4 - 35*a^4*b*B + 61*a^2*b^3*B - 8*b^5*B + 63*a^5*C - 105*a^3*b^2*C + 24*a*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*b^4*(a^2 - b^2)^2*d) + ((15*a^2*A*b^2 - 45*A*b^4 - 35*a^3*b*B + 65*a*b^3*B + 63*a^4*C - 101*a^2*b^2*C + 8*b^4*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(20*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((a^2*A*b^2 - 7*A*b^4 - 5*a^3*b*B + 11*a*b^3*B + 9*a^4*C - 15*a^2*b^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 8, -(((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d)) + ((9*a^4*A*b^2 - 15*a^2*A*b^4 + 24*A*b^6 - 45*a^5*b*B + 99*a^3*b^3*B - 72*a*b^5*B + 105*a^6*C - 223*a^4*b^2*C + 128*a^2*b^4*C + 8*b^6*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*b^5*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 38*a^3*b^3*B - 35*a*b^5*B + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^5*(a + b)^3*d) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 7*a^4*C + 13*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, -(((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d)) + ((a^3*A*b^2 - 7*a*A*b^4 + 3*a^4*b*B - 5*a^2*b^3*B + 8*b^5*B - 15*a^5*C + 33*a^3*b^2*C - 24*a*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d) - ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 + 3*a^5*b*B - 6*a^3*b^3*B + 15*a*b^5*B - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B + 3*a^4*C - 5*a^2*b^2*C + 8*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) - ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + a^5*b*B - 10*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 7, -(((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^2*b*(a^2 - b^2)^2*d)) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*b^2*(a^2 - b^2)^2*d) + ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 8, -(((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d)) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^2*b*(a^2 - b^2)^2*d) - ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^3*(a - b)^2*b*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x]))}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^3, x, 9, ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^3*(a^2 - b^2)^2*d) + ((63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 - 9*a^3*b*B + 3*a*b^3*B + 5*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 8, ((a + b)*(24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((24*a*A*b - 6*a*b*B + 12*b^2*B - a^2*C + 14*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*a*A*b^2 - 2*a^2*b*B + 8*b^3*B + a^3*C + 4*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b^2*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*(4*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A - 4*A*b - 4*a*B + a*C - 2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, -(((a + b)*(2*A - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + a*B - b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((2*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, -((2*(a + b)*(A*b + 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + 3*a*B + 3*b*B + 3*a*C - 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 5*a^2*B + 5*a*b*B + 15*a^2*C + 15*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/2), x, 7, -((2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 63*a^3*B + 49*a^2*b*B - 14*a*b^2*B + 35*a^3*C + 35*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Cos[c + d*x]^(3/2)) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 9, ((a + b)*(240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(192*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((192*a^2*A*b - 48*a*A*b^2 + 96*A*b^3 - 56*a^2*b*B + 208*a*b^2*B - 3*a^3*C + 114*a^2*b*C - 36*a*b^2*C + 72*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(96*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 - 8*a^3*b*B + 96*a*b^3*B + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b*d) + ((8*b*B + 3*a*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + ((240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b^2*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, ((a + b)*(24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a^2*A - 48*a*A*b - 24*a^2*B + 6*a*b*B - 12*b^2*B + 7*a^2*C - 26*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a*A*b^2 + 6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((2*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, -(((a + b)*(8*a*A - 4*b*B - 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^2*A + 8*a*A*b - 4*A*b^2 + 4*a^2*B - 8*a*b*B - 4*a^2*C + a*b*C - 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((8*a*A - 4*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, -(((a + b)*(8*A*b + 6*a*B - 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*B + 6*a*b*B - 3*b^2*B + 3*a^2*C - 6*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*b*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - ((8*A*b + 6*a*B - 3*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d)}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 12*a*A*b + 3*A*b^2 + 5*a^2*B + 20*a*b*B + 15*b^2*B + 15*a^2*C + 30*a*b*C - 15*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 63*a^3*B + 84*a^2*b*B + 21*a*b^2*B + 35*a^3*C + 140*a^2*b*C + 105*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 75*a^4*B + 246*a^3*b*B + 153*a^2*b^2*B - 18*a*b^3*B + 189*a^4*C + 252*a^3*b*C + 63*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(21*d*Cos[c + d*x]^(7/2)) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(5/2)) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B + 126*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^3*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 10, ((a + b)*(2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (1/(960*b*d*Sqrt[a + b*Cos[c + d*x]]))*((1920*a^3*A*b - 1040*a^2*A*b^2 + 3040*a*A*b^3 - 590*a^3*b*B + 3220*a^2*b^2*B - 360*a*b^3*B + 720*b^4*B - 15*a^4*C + 1146*a^3*b*C - 772*a^2*b^2*C + 2312*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + ((80*a^3*A*b^2 + 320*a*A*b^4 - 10*a^4*b*B + 240*a^2*b^3*B + 96*b^5*B + 3*a^5*C + 40*a^3*b^2*C + 240*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((1040*a*A*b^2 + 590*a^2*b*B + 360*b^3*B + 15*a^3*C + 772*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d) + ((80*A*b^2 + 110*a*b*B + 15*a^2*C + 64*b^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d) + ((2*b*B + a*C)*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(8*d) + (C*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d) + ((2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(1920*b^2*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, ((a + b)*(432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((192*a^3*A - 576*a^2*A*b + 48*a*A*b^2 - 96*A*b^3 - 192*a^3*B + 104*a^2*b*B - 304*a*b^2*B + 59*a^3*C - 322*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 + 40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*d) + ((8*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(4*d) + ((432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*b*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, -(((a + b)*(48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + ((24*a^3*A + 72*a^2*A*b - 72*a*A*b^2 + 24*a^3*B - 72*a^2*b*B + 6*a*b^2*B - 12*b^3*B - 24*a^3*C + 13*a^2*b*C - 38*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((40*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(8*a*A - 2*b*B - 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d) - (b*(6*A - C)*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]) - ((48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, -(((a + b)*(56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^3*A + 28*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 12*a^3*B + 36*a^2*b*B - 36*a*b^2*B + 12*a^3*C - 36*a^2*b*C + 3*a*b^2*C - 6*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(6*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(8*A*b + 4*a*B - b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + (2*(5*A*b + 3*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) - ((56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*d)}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, -(((a + b)*(18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 5*a^3*B + 35*a^2*b*B + 45*a*b^2*B - 15*b^3*B + 15*a^3*C + 45*a^2*b*C - 45*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(2*b*B + 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*(A*b + a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) - ((18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d)}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 9, -((2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(105*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(25*a^3*A + 145*a^2*A*b + 135*a*A*b^2 + 15*A*b^3 + 63*a^3*B + 119*a^2*b*B + 161*a*b^2*B + 105*b^3*B + 35*a^3*C + 245*a^2*b*C + 315*a*b^2*C - 105*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (4*b^3*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 15*A*b^2 + 56*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(5*A*b + 7*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-11/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(5/2), x, 8, -((2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 75*a^4*B + 435*a^3*b*B + 405*a^2*b^2*B + 45*a*b^3*B + 189*a^4*C + 357*a^3*b*C + 483*a^2*b^2*C + 315*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (2*(49*a^2*A + 15*A*b^2 + 90*a*b*B + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B + 231*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(315*a*d*Cos[c + d*x]^(3/2)) + (2*(5*A*b + 9*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(63*d*Cos[c + d*x]^(7/2)) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(9*d*Cos[c + d*x]^(9/2)) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 8, ((a + b)*(24*A*b^2 - 18*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(24*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*b*B - 12*b^2*B - 5*a^2*C - 2*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(12*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*a*A*b^2 - 6*a^2*b*B - 8*b^3*B + 5*a^3*C + 4*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b^2*d) + (C*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d) + ((24*A*b^2 - 18*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*b^3*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*(4*b*B - 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*A*b - a*C + 2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d) + ((4*b*B - 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^2*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, ((a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A + B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 5, (2*(a + b)*(2*A*b - 3*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*B + 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a*d*Cos[c + d*x]^(3/2)) - (2*(2*A*b - 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 6, -((2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 5*a^2*B - 10*a*b*B + 15*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a*d*Cos[c + d*x]^(5/2)) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Cos[c + d*x]^(3/2)) + (2*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-9/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 7, (2*(a + b)*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A - 44*a^2*A*b - 12*a*A*b^2 - 48*A*b^3 + 63*a^3*B + 14*a^2*b*B + 56*a*b^2*B + 35*a^3*C - 70*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(7*a*d*Cos[c + d*x]^(7/2)) - (2*(6*A*b - 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(35*a^2*d*Cos[c + d*x]^(5/2)) + (2*(25*a^2*A + 24*A*b^2 - 28*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(105*a^3*d*Cos[c + d*x]^(3/2)) - (2*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^4*d*Sqrt[Cos[c + d*x]])}

{Cos[c + d*x]^(1/2)*(a*A + (A*b + a*B)*Cos[c + d*x] + b*B*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 7, ((a + b)*(4*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*a*A - a*B + 2*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((4*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b*d)}
{Cos[c + d*x]^(-1/2)*(a + a*Cos[c + d*x] + 2*b*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/2), x, 2, (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 8, -(((8*a*A*b^2 - 12*a^2*b*B + 4*b^3*B + 15*a^3*C - 7*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(4*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*A*b^2 - 4*a*b*B + 5*a^2*C - 3*a*b*C + 2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*(a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - 12*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(2*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*A*b^2 - 4*a*b*B + 5*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d) - ((8*a*A*b^2 - 12*a^2*b*B + 4*b^3*B + 15*a^3*C - 7*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*b^3*(a^2 - b^2)*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 3*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, -((2*(A*b^2 - a*b*B + a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(A - B + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 5, -((2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A - 2*A*b + a*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 6, (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*B - 6*a*b*B + 3*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(3/2), x, 7, -((2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^4*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A - 12*a^2*A*b + 36*a*A*b^2 - 48*A*b^3 + 5*a^3*B - 30*a^2*b*B + 40*a*b^2*B + 15*a^3*C - 30*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(15*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B - 15*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 8, -(((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A*b^2 + 3*A*b^3 + 2*a^2*b*B - 3*a*b^2*B - 3*b^3*B - 5*a^3*C + 3*a^2*b*C + 6*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 5*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^(1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b + A*b^2 - a*b*B - 3*b^2*B - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 5, -((2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B + a^2*C + 3*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Sqrt[Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 6, -((2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 + 3*a^3*B + 3*a^2*b*B - 2*a*b^2*B - 3*a^3*C - a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])^(3/2)) + (2*(8*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + a*b^3*B + 2*a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(5/2), x, 7, (2*(a + b)*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (1/(9*a^3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]))*(16*((-(3/8))*a*(a^4*A + 7*a^2*A*b^2 - 4*A*b^4 - 6*a^3*b*B + 2*a*b^3*B + 3*a^4*C + a^2*b^2*C) + (3/8)*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C))*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Cos[c + d*x])^(3/2)) - (4*((-(3/2))*b^2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C) - 2*a^2*(A*b^2 - a*b*B + a^2*C) + (3/2)*a^2*b*((-A)*b + a*B - b*C))*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B - 5*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/3)*)
(**)


{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x, 2, Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(2/3), x]}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x, 2, Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*(a + b*Cos[c + d*x])^(1/3), x]}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x, 1, Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(1/3), x]}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x, 1, Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*(3*A*b + 3*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a*A + 7*b*B + 7*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(3*A*b + 3*a*B + 5*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(5*a*A + 7*b*B + 7*a*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(2*A*b + 7*a*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a*A + 5*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(A*b + a*B + 3*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(3*a*A + 5*b*B + 5*a*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(2*A*b + 5*a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 6, (-2*(A*b + a*B - b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(a*A + 3*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(2*A*b + 3*a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 6, (-2*(a*A - b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*(3*A*b + 3*a*B + b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(3*A - C)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 6, (2*(5*A*b + 5*a*B + 3*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(3*a*A + b*B + a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(5*b*B + 2*a*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 7, (2*(5*a*A + 3*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(7*A*b + 7*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(7*b*B + 2*a*C)*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(3/2)) + (2*(7*A*b + 7*a*B + 5*b*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 8, (2*(9*A*b + 9*a*B + 7*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(7*a*A + 5*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(9*b*B + 2*a*C)*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(5/2)) + (2*(9*A*b + 9*a*B + 7*b*C)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(7*a*A + 5*b*B + 5*a*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(49*a^2*A + 8*A*b^2 + 81*a*b*B + 63*a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*(4*A*b + 9*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 21*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(25*a^2*A + 8*A*b^2 + 49*a*b*B + 35*a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*(4*A*b + 7*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(2*a*A*b + a^2*B + 3*b^2*B + 6*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(9*a^2*A + 8*A*b^2 + 25*a*b*B + 15*a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(4*A*b + 5*a*B)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 7, -((2*(2*a*A*b + a^2*B - b^2*B - 2*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*(a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(5*A*b + 3*a*B - b*C)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*(4*A*b + 3*a*B)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 7, (-2*(5*a^2*A - 5*A*b^2 - 10*a*b*B - 5*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(6*a*A*b + 3*a^2*B + b^2*B + 2*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(15*a*A - 5*b*B - 7*a*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(5*A - C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 7, (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(21*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(35*A*b^2 + 49*a*b*B + 8*a^2*C + 25*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(7*b*B + 4*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 8, (2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(63*A*b^2 + 81*a*b*B + 8*a^2*C + 49*b^2*C)*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(9*b*B + 4*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(63*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(3/2)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 9, (2*(18*a*A*b + 9*a^2*B + 7*b^2*B + 14*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(77*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 45*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(99*A*b^2 + 121*a*b*B + 8*a^2*C + 81*b^2*C)*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (2*(11*b*B + 4*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(99*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(11*d*Sec[c + d*x]^(5/2)) + (2*(18*a*A*b + 9*a^2*B + 7*b^2*B + 14*a*b*C)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(77*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 45*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 21*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(176*a^2*A*b + 16*A*b^3 + 75*a^3*B + 171*a*b^2*B + 252*a^2*b*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 24*A*b^2 + 99*a*b*B + 63*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*(2*A*b + 3*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(21*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B + 15*a^2*b*C - 5*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B + 7*a^3*C + 63*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(164*a^2*A*b + 48*A*b^3 + 63*a^3*B + 231*a*b^2*B + 280*a^2*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 24*A*b^2 + 63*a*b*B + 35*a^2*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*(6*A*b + 7*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 8, -((2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B + 5*a^3*C - 15*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B + 9*a^2*b*C + b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(9*a^2*A + 33*A*b^2 + 40*a*b*B + 15*a^2*C - 5*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*(9*a^2*A + 24*A*b^2 + 35*a*b*B + 15*a^2*C)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(6*A*b + 5*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 8, -((2*(15*a^2*A*b - 5*A*b^3 + 5*a^3*B - 15*a*b^2*B - 15*a^2*b*C - 3*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B + 3*a^3*C + 3*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(40*a*A*b + 15*a^2*B - 5*b^2*B - 12*a*b*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(35*A*b + 15*a*B - 3*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*(2*A*b + a*B)*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*A*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 8, -((2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B - 5*a^3*C - 9*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(63*a^2*A*b + 7*A*b^3 + 21*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 5*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(105*a^2*A - 35*A*b^2 - 84*a*b*B - 57*a^2*C - 25*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (2*b*(35*a*A - 7*b*B - 11*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(35*d*Sqrt[Sec[c + d*x]]) - (2*b*(7*A - C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 8, (2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B + 7*a^3*C + 15*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(252*a*A*b^2 + 171*a^2*b*B + 75*b^3*B + 16*a^3*C + 176*a*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (2*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (2*(3*b*B + 2*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 9, (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B + 9*a^3*C + 21*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(1584*a*A*b^2 + 979*a^2*b*B + 539*b^3*B + 48*a^3*C + 1212*a*b^2*C)*Sin[c + d*x])/(3465*d*Sec[c + d*x]^(3/2)) + (2*(99*A*b^2 + 143*a*b*B + 24*a^2*C + 81*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(693*d*Sec[c + d*x]^(3/2)) + (2*(11*b*B + 6*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(99*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(11*d*Sec[c + d*x]^(3/2)) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^3*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 10, (2*(351*a^2*A*b + 91*A*b^3 + 117*a^3*B + 273*a*b^2*B + 273*a^2*b*C + 77*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(195*d) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B + 55*a^3*C + 135*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(2860*a*A*b^2 + 1677*a^2*b*B + 1053*b^3*B + 48*a^3*C + 2312*a*b^2*C)*Sin[c + d*x])/(9009*d*Sec[c + d*x]^(5/2)) + (2*(143*A*b^2 + 195*a*b*B + 24*a^2*C + 121*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(1287*d*Sec[c + d*x]^(5/2)) + (2*(13*b*B + 6*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(143*d*Sec[c + d*x]^(5/2)) + (2*C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(13*d*Sec[c + d*x]^(5/2)) + (2*(351*a^2*A*b + 91*A*b^3 + 117*a^3*B + 273*a*b^2*B + 273*a^2*b*C + 77*b^3*C)*Sin[c + d*x])/(585*d*Sec[c + d*x]^(3/2)) + (2*(77*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 45*b^3*B + 55*a^3*C + 135*a*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(13/2), x, 10, -((2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 220*a^3*b*B + 308*a*b^3*B + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 2761*a^3*b*B + 2057*a*b^3*B + 825*a^4*C + 4653*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (2*(1346*a^2*A*b + 192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 1782*a^2*b*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3465*d) + (2*(27*a^2*A + 16*A*b^2 + 55*a*b*B + 33*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(231*d) + (2*(8*A*b + 11*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(99*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(11/2)*Sin[c + d*x])/(11*d)}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 36*a^3*b*B + 60*a*b^3*B + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(20*a^3*A*b + 28*a*A*b^3 + 5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a^3*b*C + 84*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(147*a^4*A + 883*a^2*A*b^2 + 128*A*b^4 + 681*a^3*b*B + 837*a*b^3*B + 189*a^4*C + 1533*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(202*a^2*A*b + 64*A*b^3 + 75*a^3*B + 261*a*b^2*B + 294*a^2*b*C)*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 48*A*b^2 + 117*a*b*B + 63*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*(8*A*b + 9*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d)}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 9, -((2*(12*a^3*A*b + 20*a*A*b^3 + 3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a^3*b*C - 20*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 28*a^3*b*B + 84*a*b^3*B + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(227*a^2*A*b + 279*A*b^3 + 63*a^3*B + 511*a*b^2*B + 385*a^2*b*C - 35*b^3*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(202*a^2*A*b + 192*A*b^3 + 63*a^3*B + 413*a*b^2*B + 350*a^2*b*C)*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 48*A*b^2 + 77*a*b*B + 35*a^2*C)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*(8*A*b + 7*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 9, -((2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 20*a^3*b*B - 20*a*b^3*B + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(4*a^3*A*b + 12*a*A*b^3 + a^4*B + 18*a^2*b^2*B + b^4*B + 12*a^3*b*C + 4*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(9*a^3*A + 73*a*A*b^2 + 55*a^2*b*B - 5*b^3*B + 15*a^3*C - 17*a*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) - (2*b*(9*a^2*A + 59*A*b^2 + 50*a*b*B + 15*a^2*C - 3*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A + 16*A*b^2 + 15*a*b*B + 5*a^2*C)*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(8*A*b + 5*a*B)*(a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 9, -((2*(20*a^3*A*b - 20*a*A*b^3 + 5*a^4*B - 30*a^2*b^2*B - 3*b^4*B - 20*a^3*b*C - 12*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 84*a^3*b*B + 28*a*b^3*B + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(385*a^2*A*b - 35*A*b^3 + 105*a^3*B - 119*a*b^2*B - 141*a^2*b*C - 25*b^3*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (2*b*(350*a*A*b + 105*a^2*B - 21*b^2*B - 54*a*b*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) - (2*b*(21*A*b + 7*a*B - b*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(7*d*Sqrt[Sec[c + d*x]]) + (2*(8*A*b + 3*a*B)*(a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^4*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 9, -((2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 60*a^3*b*B - 36*a*b^3*B - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(84*a^3*A*b + 28*a*A*b^3 + 21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*C + 20*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(315*a^3*A - 357*a*A*b^2 - 423*a^2*b*B - 75*b^3*B - 187*a^3*C - 251*a*b^2*C)*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) - (2*b*(315*a^2*A - 63*A*b^2 - 162*a*b*B - 123*a^2*C - 49*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) - (2*b*(21*a*A - 3*b*B - 5*a*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) - (2*b*(9*A - C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(9*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^4*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 9, (2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 308*a^3*b*B + 220*a*b^3*B + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 2057*a^3*b*B + 2761*a*b^3*B + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sin[c + d*x])/(3465*d*Sqrt[Sec[c + d*x]]) + (2*(1782*a*A*b^2 + 1353*a^2*b*B + 539*b^3*B + 192*a^3*C + 1346*a*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(3465*d*Sqrt[Sec[c + d*x]]) + (2*(33*A*b^2 + 55*a*b*B + 16*a^2*C + 27*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]]) + (2*(11*b*B + 8*a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(99*d*Sqrt[Sec[c + d*x]]) + (2*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(11*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 10, (2*(195*a^4*A + 702*a^2*A*b^2 + 91*A*b^4 + 468*a^3*b*B + 364*a*b^3*B + 117*a^4*C + 546*a^2*b^2*C + 77*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(195*d) + (2*(308*a^3*A*b + 220*a*A*b^3 + 77*a^4*B + 330*a^2*b^2*B + 45*b^4*B + 220*a^3*b*C + 180*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(33319*a^2*A*b^2 + 7007*A*b^4 + 13351*a^3*b*B + 22763*a*b^3*B + 384*a^4*C + 25217*a^2*b^2*C + 5929*b^4*C)*Sin[c + d*x])/(45045*d*Sec[c + d*x]^(3/2)) + (2*(3146*a*A*b^2 + 2171*a^2*b*B + 1053*b^3*B + 192*a^3*C + 2518*a*b^2*C)*(a + b*Cos[c + d*x])*Sin[c + d*x])/(9009*d*Sec[c + d*x]^(3/2)) + (2*(143*A*b^2 + 221*a*b*B + 48*a^2*C + 121*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(1287*d*Sec[c + d*x]^(3/2)) + (2*(13*b*B + 8*a*C)*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(143*d*Sec[c + d*x]^(3/2)) + (2*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(13*d*Sec[c + d*x]^(3/2)) + (2*(308*a^3*A*b + 220*a*A*b^3 + 77*a^4*B + 330*a^2*b^2*B + 45*b^4*B + 220*a^3*b*C + 180*a*b^3*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/(a + b*Cos[c + d*x]), x, 9, (-2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*a^3*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*a^2*d) - (2*b*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^3*(a + b)*d) + (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*a^3*d) - (2*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*d) + (2*A*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x]), x, 8, (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*A*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*a*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d) - (2*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*d) + (2*A*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]), x, 7, (-2*A*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*d) + (2*C*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*b*(a + b)*d) + (2*A*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x]), x, 6, (2*C*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b*d) + (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d)}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]]), x, 7, (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*d) + (2*(3*A*b^2 - 3*a*b*B + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^3*d) - (2*a*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) + (2*C*Sin[c + d*x])/(3*b*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)), x, 8, (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*b^3*d) - (2*(3*a*A*b^2 - 3*a^2*b*B - b^3*B + 3*a^3*C + a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^4*d) + (2*a^2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^4*(a + b)*d) + (2*C*Sin[c + d*x])/(5*b*d*Sec[c + d*x]^(3/2)) + (2*(b*B - a*C)*Sin[c + d*x])/(3*b^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)), x, 9, (-2*(5*a*A*b^2 - 5*a^2*b*B - 3*b^3*B + 5*a^3*C + 3*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*b^4*d) + (2*(21*a^2*A*b^2 + 7*A*b^4 - 21*a^3*b*B - 7*a*b^3*B + 21*a^4*C + 7*a^2*b^2*C + 5*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(21*b^5*d) - (2*a^3*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^5*(a + b)*d) + (2*C*Sin[c + d*x])/(7*b*d*Sec[c + d*x]^(5/2)) + (2*(b*B - a*C)*Sin[c + d*x])/(5*b^2*d*Sec[c + d*x]^(3/2)) + (2*(7*A*b^2 - 7*a*b*B + 7*a^2*C + 5*b^2*C)*Sin[c + d*x])/(21*b^3*d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^2, x, 9, ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d) + ((7*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 3*a*b^3*B + 3*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) - ((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^2, x, 8, -(((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d)) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d) - ((5*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + a*b^3*B + a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*b*(a + b)^2*d) + ((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^2, x, 7, -(((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d)) - ((A*b^2 - a*b*B - a^2*C + 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) + ((3*a^2*A*b^2 - A*b^4 - a^3*b*B - a*b^3*B - a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]), x, 7, ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) + ((a*A*b^2 + a^2*b*B - 2*b^3*B - 3*a^3*C + 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) - ((a^2*A*b^2 + A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)), x, 8, -(((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d)) + ((3*a^2*A*b^2 - 6*A*b^4 - 9*a^3*b*B + 12*a*b^3*B + 15*a^4*C - 16*a^2*b^2*C - 2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^4*(a^2 - b^2)*d) - (a*(a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^4*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)), x, 9, ((15*a^2*A*b^2 - 10*A*b^4 - 25*a^3*b*B + 20*a*b^3*B + 35*a^4*C - 24*a^2*b^2*C - 6*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(5*b^4*(a^2 - b^2)*d) - ((9*a^3*A*b^2 - 12*a*A*b^4 - 15*a^4*b*B + 16*a^2*b^3*B + 2*b^5*B + 21*a^5*C - 20*a^3*b^2*C - 4*a*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*b^5*(a^2 - b^2)*d) + (a^2*(3*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 7*a*b^3*B + 7*a^4*C - 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^5*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)) + ((5*A*b^2 - 5*a*b*B + 7*a^2*C - 2*b^2*C)*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - ((3*a*A*b^2 - 5*a^2*b*B + 2*b^3*B + 7*a^3*C - 4*a*b^2*C)*Sin[c + d*x])/(3*b^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^3, x, 10, ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(12*a^3*(a^2 - b^2)^2*d) + ((63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) - ((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 - 9*a^3*b*B + 3*a*b^3*B + 5*a^4*C + a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^3, x, 9, -((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d) - ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*b*(a + b)^3*d) + ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/(a + b*Cos[c + d*x])^3, x, 8, -((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d) + ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) + ((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sqrt[Sec[c + d*x]]), x, 8, ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B + 3*a^4*C - 5*a^2*b^2*C + 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) - ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + a^5*b*B - 10*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sqrt[Sec[c + d*x]]) - ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(3/2)), x, 8, -((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) + ((a^3*A*b^2 - 7*a*A*b^4 + 3*a^4*b*B - 5*a^2*b^3*B + 8*b^5*B - 15*a^5*C + 33*a^3*b^2*C - 24*a*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) - ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 + 3*a^5*b*B - 6*a^3*b^3*B + 15*a*b^5*B - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(3/2)) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(5/2)), x, 9, -((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) + ((9*a^4*A*b^2 - 15*a^2*A*b^4 + 24*A*b^6 - 45*a^5*b*B + 99*a^3*b^3*B - 72*a*b^5*B + 105*a^6*C - 223*a^4*b^2*C + 128*a^2*b^4*C + 8*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(12*b^5*(a^2 - b^2)^2*d) - (a*(3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 38*a^3*b^3*B - 35*a*b^5*B + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^5*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(5/2)) + ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 7*a^4*C + 13*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(3/2)) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^3*Sec[c + d*x]^(7/2)), x, 10, ((75*a^4*A*b^2 - 145*a^2*A*b^4 + 40*A*b^6 - 175*a^5*b*B + 325*a^3*b^3*B - 120*a*b^5*B + 315*a^6*C - 561*a^4*b^2*C + 192*a^2*b^4*C + 24*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(20*b^5*(a^2 - b^2)^2*d) - ((45*a^5*A*b^2 - 99*a^3*A*b^4 + 72*a*A*b^6 - 105*a^6*b*B + 223*a^4*b^3*B - 128*a^2*b^5*B - 8*b^7*B + 189*a^7*C - 387*a^5*b^2*C + 192*a^3*b^4*C + 24*a*b^6*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*b^6*(a^2 - b^2)^2*d) + (a^2*(15*a^4*A*b^2 - 38*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 86*a^3*b^3*B - 63*a*b^5*B + 63*a^6*C - 150*a^4*b^2*C + 99*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*b)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^6*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^(7/2)) - ((a^2*A*b^2 - 7*A*b^4 - 5*a^3*b*B + 11*a*b^3*B + 9*a^4*C - 15*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])*Sec[c + d*x]^(5/2)) + ((15*a^2*A*b^2 - 45*A*b^4 - 35*a^3*b*B + 65*a*b^3*B + 63*a^4*C - 101*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(20*b^3*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)) - ((15*a^3*A*b^2 - 33*a*A*b^4 - 35*a^4*b*B + 61*a^2*b^3*B - 8*b^5*B + 63*a^5*C - 105*a^3*b^2*C + 24*a*b^4*C)*Sin[c + d*x])/(12*b^4*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Cos[c+d x]+C Cos[c+d x]^2) (a+b Cos[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 57*a^3*b*B + 24*a*b^3*B + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^4*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 111*a^3*A*b - 24*a^2*A*b^2 - 4*a*A*b^3 - 16*A*b^4 + 75*a^4*B + 57*a^3*b*B + 6*a^2*b^2*B + 24*a*b^3*B + 189*a^4*C + 147*a^3*b*C - 42*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(13*a^2*A*b + 8*A*b^3 + 75*a^3*B - 12*a*b^2*B + 21*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a^3*d) + (2*(49*a^2*A - 6*A*b^2 + 9*a*b*B + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*a^2*d) + (2*(A*b + 9*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 57*a^3*b*B + 24*a*b^3*B + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^4*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(25*a^3*A + 19*a^2*A*b + 2*a*A*b^2 + 8*A*b^3 + 63*a^3*B + 49*a^2*b*B - 14*a*b^2*B + 35*a^3*C + 35*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a^2*d) + (2*(A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^3*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 7, -((2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 7*a*A*b - 2*A*b^2 + 5*a^2*B + 5*a*b*B + 15*a^2*C + 15*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^2*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 8, -((2*(a + b)*(A*b + 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + 3*a*B + 3*b*B + 3*a*C - 3*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a*d)}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 8, -(((a + b)*(2*A - C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a*A + A*b + a*B - b*B - a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((2*A - C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(d*Sqrt[Sec[c + d*x]])}
{Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 8, ((a + b)*(4*b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*a*A - 4*A*b - 4*a*B + a*C - 2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + ((4*b*B + a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 9, ((a + b)*(24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((24*a*A*b - 6*a*b*B + 12*b^2*B - a^2*C + 14*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*a*A*b^2 - 2*a^2*b*B + 8*b^3*B + a^3*C + 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*d*Sec[c + d*x]^(3/2)) + ((6*b*B + a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^2*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Cos[c + d*x]]*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 10, ((a + b)*(48*a*A*b^2 - 24*a^2*b*B + 128*b^3*B + 15*a^3*C + 28*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a*A*b^2 - 96*A*b^3 + 8*a^2*b*B - 112*a*b^2*B - 5*a^3*C - 2*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((16*a^2*A*b^2 - 64*A*b^4 - 8*a^3*b*B - 32*a*b^3*B + 5*a^4*C + 8*a^2*b^2*C - 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sec[c + d*x]^(5/2)) + ((8*b*B + a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*b*d*Sec[c + d*x]^(3/2)) + ((48*A*b^2 + 8*a*b*B - 5*a^2*C + 36*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b^2*d*Sqrt[Sec[c + d*x]]) + ((48*a*A*b^2 - 24*a^2*b*B + 128*b^3*B + 15*a^3*C + 28*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b^3*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 186*a^3*A*b + 33*a^2*A*b^2 + 2*a*A*b^3 + 8*A*b^4 + 75*a^4*B + 246*a^3*b*B + 153*a^2*b^2*B - 18*a*b^3*B + 189*a^4*C + 252*a^3*b*C + 63*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B + 126*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*a*d) + (2*(A*b + 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(21*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^3*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 8, -((2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(105*a*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(25*a^3*A + 82*a^2*A*b + 51*a*A*b^2 - 6*A*b^3 + 63*a^3*B + 84*a^2*b*B + 21*a*b^2*B + 35*a^3*C + 140*a^2*b*C + 105*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a*d) + (2*(3*A*b + 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^2*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 9, -((2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 12*a*A*b + 3*A*b^2 + 5*a^2*B + 20*a*b*B + 15*b^2*B + 15*a^2*C + 30*a*b*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (4*b^2*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*A*b + 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a*d)}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 9, -(((a + b)*(8*A*b + 6*a*B - 3*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(a^2*A + 4*a*A*b + 3*A*b^2 + 3*a^2*B + 6*a*b*B - 3*b^2*B + 3*a^2*C - 6*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b*(2*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) - ((8*A*b + 6*a*B - 3*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 9, -(((a + b)*(8*a*A - 4*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^2*A + 8*a*A*b - 4*A*b^2 + 4*a^2*B - 8*a*b*B - 4*a^2*C + a*b*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(4*A - C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((8*a*A - 4*b*B - 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 9, ((a + b)*(24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a^2*A - 48*a*A*b - 24*a^2*B + 6*a*b*B - 12*b^2*B + 7*a^2*C - 26*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((24*a*A*b^2 + 6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((2*b*B + a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) + (C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^(3/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 10, ((a + b)*(240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((192*a^2*A*b - 48*a*A*b^2 + 96*A*b^3 - 56*a^2*b*B + 208*a*b^2*B - 3*a^3*C + 114*a^2*b*C - 36*a*b^2*C + 72*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 - 8*a^3*b*B + 96*a*b^3*B + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*b*B + 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(24*d*Sec[c + d*x]^(3/2)) + (C*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(4*d*Sec[c + d*x]^(3/2)) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(96*b*d*Sqrt[Sec[c + d*x]]) + ((240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b^2*d*Sqrt[Sec[c + d*x]])}


{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(13/2), x, 10, -((1/(3465*a^3*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 4785*a^4*b*C + 495*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])) + (1/(3465*a^2*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(675*a^5*A + 3705*a^4*A*b + 3315*a^3*A*b^2 + 255*a^2*A*b^3 + 10*a*A*b^4 + 40*A*b^5 + 1617*a^5*B + 2871*a^4*b*B + 3069*a^3*b^2*B + 1705*a^2*b^3*B - 110*a*b^4*B + 825*a^5*C + 4785*a^4*b*C + 4455*a^3*b^2*C + 495*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B + 825*a^4*C + 1485*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3465*a^2*d) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B + 1485*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3465*a*d) + (2*(27*a^2*A + 5*A*b^2 + 44*a*b*B + 33*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(231*d) + (2*(5*A*b + 11*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(99*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(11/2)*Sin[c + d*x])/(11*d) + (1/(3465*a^3*d))*(2*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 4785*a^4*b*C + 495*a^2*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(11/2), x, 9, -((2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(315*a*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(147*a^4*A + 261*a^3*A*b + 279*a^2*A*b^2 + 155*a*A*b^3 - 10*A*b^4 + 75*a^4*B + 435*a^3*b*B + 405*a^2*b^2*B + 45*a*b^3*B + 189*a^4*C + 357*a^3*b*C + 483*a^2*b^2*C + 315*a*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B + 231*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*a*d) + (2*(49*a^2*A + 15*A*b^2 + 90*a*b*B + 63*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*(5*A*b + 9*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(9/2)*Sin[c + d*x])/(9*d) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*a^2*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2), x, 10, -((2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Cos[c + d*x]])) + (1/(105*d*Sqrt[a + b*Cos[c + d*x]]))*(2*(25*a^3*A + 145*a^2*A*b + 135*a*A*b^2 + 15*A*b^3 + 63*a^3*B + 119*a^2*b*B + 161*a*b^2*B + 105*b^3*B + 35*a^3*C + 245*a^2*b*C + 315*a*b^2*C - 105*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (4*b^3*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 15*A*b^2 + 56*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*(5*A*b + 7*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d) + (2*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a*d)}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2), x, 10, -(((a + b)*(18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A + 17*a^2*A*b + 23*a*A*b^2 + 15*A*b^3 + 5*a^3*B + 35*a^2*b*B + 45*a*b^2*B - 15*b^3*B + 15*a^3*C + 45*a^2*b*C - 45*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Cos[c + d*x]]) + (2*b^2*(2*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(A*b + a*B)*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) - ((18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2), x, 10, -(((a + b)*(56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]])) + ((4*a^3*A + 28*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 12*a^3*B + 36*a^2*b*B - 36*a*b^2*B + 12*a^3*C - 36*a^2*b*C + 3*a*b^2*C - 6*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(6*d*Sqrt[a + b*Cos[c + d*x]]) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(8*A*b + 4*a*B - b*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d*Sqrt[Sec[c + d*x]]) + (2*(5*A*b + 3*a*B)*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) - ((56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2), x, 10, -(((a + b)*(48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Cos[c + d*x]])) + ((24*a^3*A + 72*a^2*A*b - 72*a*A*b^2 + 24*a^3*B - 72*a^2*b*B + 6*a*b^2*B - 12*b^3*B - 24*a^3*C + 13*a^2*b*C - 38*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Cos[c + d*x]]) + ((40*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Cos[c + d*x]]) - (b*(8*a*A - 2*b*B - 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) - (b*(6*A - C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Cos[c + d*x])^(5/2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d - ((48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d*Sqrt[Sec[c + d*x]])}
{(a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2), x, 10, ((a + b)*(432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((192*a^3*A - 576*a^2*A*b + 48*a*A*b^2 - 96*A*b^3 - 192*a^3*B + 104*a^2*b*B - 304*a*b^2*B + 59*a^3*C - 322*a^2*b*C + 36*a*b^2*C - 72*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(96*d*Sqrt[a + b*Cos[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 + 40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(32*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(32*d*Sqrt[Sec[c + d*x]]) + ((8*b*B + 5*a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(24*d*Sqrt[Sec[c + d*x]]) + (C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(4*d*Sqrt[Sec[c + d*x]]) + ((432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(192*b*d*Sqrt[Sec[c + d*x]])}
{((a + b*Cos[c + d*x])^(5/2)*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Sec[c + d*x]^(1/2), x, 11, ((a + b)*(2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(1920*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((1920*a^3*A*b - 1040*a^2*A*b^2 + 3040*a*A*b^3 - 590*a^3*b*B + 3220*a^2*b^2*B - 360*a*b^3*B + 720*b^4*B - 15*a^4*C + 1146*a^3*b*C - 772*a^2*b^2*C + 2312*a*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(960*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((80*a^3*A*b^2 + 320*a*A*b^4 - 10*a^4*b*B + 240*a^2*b^3*B + 96*b^5*B + 3*a^5*C + 40*a^3*b^2*C + 240*a*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(64*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((80*A*b^2 + 110*a*b*B + 15*a^2*C + 64*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(240*d*Sec[c + d*x]^(3/2)) + ((2*b*B + a*C)*(a + b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(8*d*Sec[c + d*x]^(3/2)) + (C*(a + b*Cos[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + ((1040*a*A*b^2 + 590*a^2*b*B + 360*b^3*B + 15*a^3*C + 772*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(960*b*d*Sqrt[Sec[c + d*x]]) + ((2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(1920*b^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(9/2))/Sqrt[a + b*Cos[c + d*x]], x, 8, (2*(a + b)*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^4*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^3*A - 44*a^2*A*b - 12*a*A*b^2 - 48*A*b^3 + 63*a^3*B + 14*a^2*b*B + 56*a*b^2*B + 35*a^3*C - 70*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 - 28*a*b*B + 35*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*a^3*d) - (2*(6*A*b - 7*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*a^2*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*a*d) - (2*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*a^4*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, -((2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^2*A + 2*a*A*b + 8*A*b^2 + 5*a^2*B - 10*a*b*B + 15*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a^2*d) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a*d) + (2*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^3*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/Sqrt[a + b*Cos[c + d*x]], x, 6, (2*(a + b)*(2*A*b - 3*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + 3*a*B + 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*d) - (2*(2*A*b - 3*a*B)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^2*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, (-2*A*(a + b)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A + B - C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*A*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(a*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/Sqrt[a + b*Cos[c + d*x]], x, 7, ((a + b)*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A - B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(1/2)), x, 8, ((a + b)*(4*b*B - 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((4*A*b - a*C + 2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b*d*Sqrt[Sec[c + d*x]]) + ((4*b*B - 3*a*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)), x, 9, ((a + b)*(24*A*b^2 - 18*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(24*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((6*a*b*B - 12*b^2*B - 5*a^2*C - 2*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(12*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - ((8*a*A*b^2 - 6*a^2*b*B - 8*b^3*B + 5*a^3*C + 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + (C*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(3*b*d*Sec[c + d*x]^(3/2)) + ((6*b*B - 5*a*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(12*b^2*d*Sqrt[Sec[c + d*x]]) + ((24*A*b^2 - 18*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(24*b^3*d*Sqrt[Sec[c + d*x]])}

{((a*A + (A*b + a*B)*Cos[c + d*x] + b*B*Cos[c + d*x]^2)*Sqrt[Sec[c + d*x]])/Sqrt[a + b*Cos[c + d*x]], x, 7, ((a + b)*B*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - A*b - a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*A*b + a*B)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Cos[c + d*x]]) + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(7/2))/(a + b*Cos[c + d*x])^(3/2), x, 8, -((2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^4*(a - b)*d*Sqrt[a + b*Cos[c + d*x]])) + (2*(9*a^3*A - 12*a^2*A*b + 36*a*A*b^2 - 48*A*b^3 + 5*a^3*B - 30*a^2*b*B + 40*a*b^2*B + 15*a^3*C - 30*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(15*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B - 15*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B - 5*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d) + (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*a^4*(a^2 - b^2)*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^(3/2), x, 7, (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 6*a*A*b + 8*A*b^2 + 3*a^2*B - 6*a*b*B + 3*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) - (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^(3/2), x, 6, (-2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A - 2*A*b + a*B - a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(a^2*(a^2 - b^2)*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/(a + b*Cos[c + d*x])^(3/2), x, 7, (-2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A - B + C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Tan[(c + d*x)/2])/(a*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(1/2)), x, 8, ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b - b*B + a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 3*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)), x, 9, -((8*a*A*b^2 - 12*a^2*b*B + 4*b^3*B + 15*a^3*C - 7*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(4*(a - b)*b^3*d*Sqrt[a + b*Cos[c + d*x]]) + ((4*A*b^2 - 4*a*b*B + 5*a^2*C - 3*a*b*C + 2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*(a - b)*b^2*d*Sqrt[a + b*Cos[c + d*x]]) + ((8*A*b^2 - 12*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(2*b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)) + ((4*A*b^2 - 4*a*b*B + 5*a^2*C - b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) - ((8*a*A*b^2 - 12*a^2*b*B + 4*b^3*B + 15*a^3*C - 7*a*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(4*b^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(5/2))/(a + b*Cos[c + d*x])^(5/2), x, 8, (2*(a + b)*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) - (1/(9*a^3*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]))*(16*((-(3/8))*a*(a^4*A + 7*a^2*A*b^2 - 4*A*b^4 - 6*a^3*b*B + 2*a*b^3*B + 3*a^4*C + a^2*b^2*C) + (3/8)*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C))*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) - (4*((-(3/2))*b^2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C) - 2*a^2*(A*b^2 - a*b*B + a^2*C) + (3/2)*a^2*b*((-A)*b + a*B - b*C))*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (1/(3*a^3*(a^2 - b^2)^2*d))*(2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B - 5*a^4*C + a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sec[c + d*x]^(3/2)*Sin[c + d*x]) - (1/(3*a^4*(a^2 - b^2)^2*d))*(2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x])^(5/2), x, 7, (-2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^3*A - 9*a^2*A*b - 6*a*A*b^2 + 8*A*b^3 + 3*a^3*B + 3*a^2*b*B - 2*a*b^2*B - 3*a^3*C - a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)) + (2*(8*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + a*b^3*B + 2*a^4*C + 2*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*a^3*(a^2 - b^2)^2*d)}
{((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^(1/2))/(a + b*Cos[c + d*x])^(5/2), x, 6, (-2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B + a^2*C + 3*a*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) - (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Tan[(c + d*x)/2])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(1/2)), x, 8, (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(3*a*A*b + A*b^2 - a*b*B - 3*b^2*B - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (4*C*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sqrt[Sec[c + d*x]]) + (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Tan[(c + d*x)/2])/(3*a*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]])}
{(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/((a + b*Cos[c + d*x])^(5/2)*Sec[c + d*x]^(3/2)), x, 9, -((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(a*A*b^2 + 3*A*b^3 + 2*a^2*b*B - 3*a*b^2*B - 3*b^3*B - 5*a^3*C + 3*a^2*b*C + 6*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(2*b*B - 5*a*C)*Sqrt[Cos[c + d*x]]*Sqrt[1 + Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((a - b)/(a + b))]*Sqrt[Sec[c + d*x]])/(b^3*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/2)*Sec[c + d*x]^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Cos[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
